Learning blocks

After extracting meaningful features from the raw signal using signal processing, you can now train your model using a learning block. We provide several pre-defined learning blocks:

Miss an architecture? You can create a custom learning block, with PyTorch, Keras or scikit-learn to bring your custom architecture and train it with Edge Impulse. If you already have a trained model, you can also Bring Your Own Model (BYOM) to directly profile it and deploy it on your edge devices.

If you are familiar with TensorFlow and Keras, in most blocks, you can use the Switch to Expert mode button to access the full Keras API for custom architectures, rebalance your weights, change the optimizer, and more.

For most of the learning blocks provided by Edge Impulse (Keras and Transfer Learning-based blocks), a view similar to the one below is available. See the dedicated learning block page for specific details when it differs.

Classifier view

Neural Network settings

NN Settings
  • Number of training cycles: Each time the training algorithm makes one complete pass through all of the training data with back-propagation and updates the model's parameters as it goes, it is known as an epoch or training cycle.

  • Use Learned Optimizer (VeLO): Use a neural network as an optimizer to calculate gradients and learning rates. For optimal results with VeLO, it is recommended to use as large a batch size as possible, potentially equal to the dataset's size. See Learned Optimizer (VeLO)

  • Learning rate: The learning rate controls how much the model's internal parameters are updated during each step of the training process. Or, you can also see it as how fast the neural network will learn. If the network overfits quickly, you can reduce the learning rate.

  • Validation set size: The percentage of your training set held apart for validation, a good default is 20%.

  • Split train/validation set on metadata key: Prevent group data leakage between train and validation datasets using sample metadata. Given a metadata key, samples with the same value for that key will always be on the same side of the validation split. Leave empty to disable. Also, see metadata.

  • Batch size: The batch size used during training. If not set, we'll use the default value. Training may fail if the batch size is too high.

  • Auto-weight classes While training, pay more attention to samples from under-represented classes. Might help make the model more robust against overfitting if you have little data for some classes.

  • Profile int8 model: Profiling the quantized model might take a long time on large datasets. Disable this option to skip profiling.

Neural Network architecture

For classification and regression tasks, you can edit the layers directly from the web interface. Depending on your project type, we may offer to choose between different architecture presets to help you get started.

NN Architecture

The neural network architecture takes as inputs your extracted features, and pass the features to each layer of your architecture. In the classification case, the last used layer is a softmax layer. It is this last layer that gives the probability of belonging to one of the classes.

From the visual (simple) mode, you can add the following layers:

NN layers

For Transfer Learning tasks like Audio or Image Transfer learning and Object Detection, you can select which pre-trained model is more suited for your use case and edit the last layers parameters to be trained:

MobileNetV1 96x96 0.25 pre-trained model

Expert mode

If have advanced knowledge in machine learning and Keras, you can switch to the Expert Mode and access the full Keras API to use custom architectures:

Switch to expert mode
NN expert mode

You can use the expert mode to change your loss function, optimizer, print your model architecture and even set an early stopping callback to prevent overfitting your model.

Last updated

Revision created

tab only