Model Training
Training a Motion model
Set the training options, start training and read the training output for a Motion project.
Try it in StudioOn 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
- In Studio's left menu, open your learning block (for example Classification).
- Under Neural Network settings → Training settings, set:
| Setting | Default | What it does |
|---|---|---|
| Training cycles | 60 | How many passes over the training data (epochs) |
| Learning rate | 0.001 | How big each weight adjustment is |
| Processor | CPU | Where training runs. Choose GPU only if your PetalEdge server offers it; otherwise the job is not started. |
- Open Advanced Settings if you want to change:
| Setting | Default | What it does |
|---|---|---|
| Batch size | 32 | How many windows the model sees before each adjustment. Training may fail if it is too high. |
| Validation split | 0.2 | Share of the training data kept aside to check progress (0 to 0.9) |
- Optionally change the layers under Architecture (see Editing the neural network).
- Select Start training.
- Follow progress in Training output. You can select Cancel to stop a running job.
What happens during training
- 1Load featuresFrom Generate features
- 2Hold out validationWhole recordings, about 20 %
- 3TrainAdam optimizer, one cycle at a time
- 4Early stoppingStops after 20 cycles with no improvement
- 5ExportFloat32 and INT8 versions
- 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 see | What it usually means | What to try |
|---|---|---|
| Training and validation accuracy both high and close | The model learned well | Check it on the testing set in Evaluation |
| Training accuracy high, validation clearly lower | Overfitting: it memorised the training data | More recordings, fewer training cycles, or a smaller network |
| Both low | Underfitting, or features that don't separate the labels | Look at the feature explorer, try another processing block, train longer |
| Training stops early | No improvement for 20 cycles | Normal; 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.