Validation and Performance Measurement

STM32Cube AI Studio provides robust tools for validating model accuracy and measuring system performance.

1. Validation modes

1.1. Desktop validation

  • Purpose: Compare original model and generated C model outputs.
  • Metrics:
    • ACC: Classification accuracy
    • RMSE: Root mean square error
    • MAE: Mean absolute error
    • L2r: L2 relative error

1.2. On-target validation

  • Purpose: Validate model on STM32 hardware.
  • Features:
    • Automatic board detection
    • Signature check (RAM/ROM size, MACC, nodes, tool versions)
    • Layer-by-layer performance reporting
    • L2 error on last output layer

2. Typical output fields

Field Description
Duration Inference time (ms)
CPU Cycles Cycles per inference
Cycles/MACC Efficiency metric
Used heap Dynamic memory usage
Used stack Stack memory usage

3. Validation data

  • Representative dataset: Use pre-processed data matching the original model input pipeline.
  • Output format: For classifiers, use one-hot encoding.
Note white.png Note

For integration details, see Library Integration & API.

4. Related ST Edge AI Core documentation

5. Next steps

  1. Library integration and API
  2. FAQ and Troubleshooting