Complete Guide
Everything you need to know to configure your deep learning model
What is Deep Learning for Edge?
This tool allows you to design an artificial neural network and generate optimized code that runs directly on a microcontroller (MCU). This is known as TinyML or Edge AI.
Instead of relying on cloud servers, your model runs locally on the device, which enables:
Inference in milliseconds without internet connection
Data never leaves the device
Low power consumption for battery-powered devices
Step-by-step process
Select your microcontroller
Choose the platform where the model will run. Each option generates code in a different language and format, optimized for that hardware's capabilities.
Configure training epochs
An epoch is one complete pass through the entire dataset. More epochs generally improve accuracy but increase training time and can cause overfitting. Start with 300-500 and adjust based on results.
Design the layer architecture
Define how many hidden layers your network will have and how many neurons each layer contains. More layers and neurons allow capturing more complex patterns, but also require more memory and inference time on the MCU.
Upload your training dataset
A CSV file with your training data. Columns represent features and the last column is the label that the model should predict.
Generate the model
The system processes your configuration, trains the neural network, and generates optimized source code ready to compile and upload to your microcontroller.
Video tutorial
Watch this video for a visual step-by-step explanation of how to use the tool:
Activation functions explained
Activation functions determine how a neuron transforms its input. Without them, a neural network would be just a linear combination (unable to learn complex patterns).
The most popular activation for hidden layers. Fast to compute and works well in most cases. If the neuron receives a negative value, it converts it to 0. Very efficient on microcontrollers due to its computational simplicity.
Recommended for
Hidden layers in general, default first choice
Avoid for
Problems where dead neurons are an issue
A ReLU variant that allows a small gradient when x < 0 (typically α = 0.01). Prevents 'dead neurons' where neurons permanently stop learning.
Recommended for
When ReLU causes dead neurons or the model doesn't converge
Avoid for
If ReLU already works well (adds an extra parameter)
A piecewise linear approximation of the Tanh function. Much more efficient to compute than Tanh since it doesn't require exponentials. Ideal for resource-constrained microcontrollers.
Recommended for
MCUs with limited compute capacity, efficient Tanh replacement
Avoid for
If you need smooth outputs outside the [-1, 1] range
A piecewise linear approximation of the Sigmoid function. Eliminates the need to compute exponentials, making it ideal for resource-limited hardware. Produces outputs in the [0, 1] range.
Recommended for
Output layer for binary classification on MCUs, efficient Sigmoid replacement
Avoid for
Problems requiring very smooth gradients
CSV dataset format
The CSV file must follow a specific format for the system to process it correctly:
Required structure
Requirements
- > First row: column names (header)
- > First column: auto-increment row ID
- > Last column: label/class to predict
- > Label: value integer and starting from 0 with consecutive values
- > unlimited Label/class to predict
- > Numeric features (decimals with dot)
- > No empty or null values
- > Separator: comma (,)
- > Maximum size: 1 MB
Recommendations
- Normalize features to the [0, 1] range
- Balance classes (same amount per label)
- Minimum 50 samples per class
- Check for outliers that may distort the model
- Use UTF-8 encoding
Tips for better results
Start simple
Begin with 2-3 layers and few neurons. Increase complexity only if the model doesn't learn sufficiently.
Balance performance vs. resources
More neurons = more accuracy but more RAM and inference time. On an MCU with 264 KB of RAM, a model with 50+ neurons may not fit.
Adjust epochs gradually
If the model underfits, increase epochs. If it overfits, reduce them or add more data.
Dataset quality matters more
A clean, well-labeled dataset with 200 samples usually works better than a noisy one with 2000 samples.
Watch out for overfitting
If you use many epochs and few samples, the model memorizes the data instead of learning patterns. Sign: works perfectly on training but fails with new data.