Skip to content

Model Training

Training a Motion model

Set the training options, start training and read the training output for a Motion project.

Try it in Studio
On this page

Goal

By the end of this page you will have trained a Motion model and know whether the training went well.

Before you start

  • Your impulse has a processing block and a learning block, and is saved.
  • You have selected Generate features on the processing block's page. If not, the training page shows Go to Generate features.

Steps

  1. In Studio's left menu, open your learning block (for example Classification).
  2. Under Neural Network settings → Training settings, set:
SettingDefaultWhat it does
Training cycles60How many passes over the training data (epochs)
Learning rate0.001How big each weight adjustment is
ProcessorCPUWhere training runs. Choose GPU only if your PetalEdge server offers it; otherwise the job is not started.
  1. Open Advanced Settings if you want to change:
SettingDefaultWhat it does
Batch size32How many windows the model sees before each adjustment. Training may fail if it is too high.
Validation split0.2Share of the training data kept aside to check progress (0 to 0.9)
  1. Optionally change the layers under Architecture (see Editing the neural network).
  2. Select Start training.
  3. Follow progress in Training output. You can select Cancel to stop a running job.

What happens during training

  1. 1Load featuresFrom Generate features
  2. 2Hold out validationWhole recordings, about 20 %
  3. 3TrainAdam optimizer, one cycle at a time
  4. 4Early stoppingStops after 20 cycles with no improvement
  5. 5ExportFloat32 and INT8 versions
One training job
  • Validation windows come from different recordings than training windows, so a recording never ends up on both sides.
  • Early stopping watches validation accuracy (validation loss for Regression). The best version seen is kept.
  • After training, Studio saves the model in two precisions, Float32 and INT8, and scores both.

Reading the result

What you seeWhat it usually meansWhat to try
Training and validation accuracy both high and closeThe model learned wellCheck it on the testing set in Evaluation
Training accuracy high, validation clearly lowerOverfitting: it memorised the training dataMore recordings, fewer training cycles, or a smaller network
Both lowUnderfitting, or features that don't separate the labelsLook at the feature explorer, try another processing block, train longer
Training stops earlyNo improvement for 20 cyclesNormal; the best version is kept

Retrain after changes

Retrain model in the left menu trains again with the same settings as your last training job, in one click. After you add or fix data, select Generate features on the processing block's page first, then retrain.

What next?