3.3. Understanding Config
This guide explains the YAML configuration file structure used by Tiny ML Tensorlab.
3.3.1. Configuration Overview
Every training run is controlled by a YAML configuration file with these sections:
common: # General settings
dataset: # Data source and splitting
data_processing_feature_extraction: # Preprocessing
training: # Model and training parameters
testing: # Test evaluation settings
compilation: # Device compilation settings
3.3.2. Common Section
common:
target_module: 'timeseries'
task_type: 'generic_timeseries_classification'
target_device: 'F28P55'
run_name: '{date-time}/{model_name}'
Parameter |
Description |
|---|---|
|
|
|
Task type (see valid values below) |
|
Target MCU (e.g., |
|
Output directory name. Supports placeholders: |
Valid task_type Values:
|
Time series classification |
|
Time series regression |
|
Time series forecasting |
|
Anomaly detection (autoencoder) |
|
Image classification |
3.3.3. Dataset Section
dataset:
enable: True
dataset_name: 'my_dataset'
input_data_path: '/path/to/data' # or URL
split_type: 'amongst_files'
split_factor: [0.6, 0.3, 0.1]
Parameter |
Description |
|---|---|
|
Set |
|
Name used for output directory |
|
Local path, zip file, or URL |
|
|
|
[train, val, test] ratios (must sum to 1.0) |
3.3.4. Data Processing & Feature Extraction Section
data_processing_feature_extraction:
# Data processing
data_proc_transforms: ['DownSample', 'SimpleWindow']
sampling_rate: 100000
new_sr: 10000
frame_size: 1024
stride_size: 0.5
# Feature extraction
feature_extraction_name: 'Generic_1024Input_FFTBIN_64Feature_8Frame'
variables: 1
Data Processing Parameters:
Parameter |
Description |
|---|---|
|
List of transforms: |
|
Original sample rate (for DownSample) |
|
Target sample rate after downsampling |
|
Window size in samples |
|
Overlap fraction (0.5 = 50% overlap) |
Feature Extraction Parameters:
Parameter |
Description |
|---|---|
|
Preset name (see Feature Extraction) |
|
Number of input channels |
|
Custom transform list if not using preset |
3.3.5. Training Section
training:
enable: True
model_name: 'CLS_1k_NPU'
batch_size: 256
training_epochs: 20
num_gpus: 0
learning_rate: 0.001
Parameter |
Description |
|---|---|
|
Set |
|
Model architecture name from ModelZoo |
|
Samples per training batch |
|
Number of training passes |
|
|
|
Initial learning rate (default varies by task) |
NAS Parameters (Optional):
training:
nas_enabled: True
nas_epochs: 10
nas_optimization_mode: 'Memory' # or 'Compute'
nas_model_size: 'm' # s, m, l, xl, xxl
3.3.6. Testing Section
testing:
enable: True
Usually left empty ({}) to use defaults. Testing automatically runs
on the test set after training.
3.3.7. Compilation Section
compilation:
enable: True
preset_name: 'default_preset' # or 'compress_npu_layer_data'
Parameter |
Description |
|---|---|
|
Set |
|
Compilation options preset |
|
Path to external ONNX model (for BYOM) |
3.3.8. Complete Example
common:
target_module: 'timeseries'
task_type: 'generic_timeseries_classification'
target_device: 'F28P55'
run_name: '{date-time}/{model_name}'
dataset:
enable: True
dataset_name: 'my_vibration_data'
input_data_path: '/data/vibration_dataset'
split_factor: [0.7, 0.2, 0.1]
data_processing_feature_extraction:
data_proc_transforms: ['SimpleWindow']
frame_size: 512
stride_size: 0.25
feature_extraction_name: 'Generic_512Input_FFTBIN_32Feature_8Frame'
variables: 3
training:
enable: True
model_name: 'CLS_4k_NPU'
batch_size: 128
training_epochs: 50
num_gpus: 1
testing:
enable: True
compilation:
enable: True
3.3.9. Tips
Start with a preset
feature_extraction_namebefore customizingUse smaller
batch_sizeif you run out of memorySet
num_gpus: 0to force CPU trainingUse
enable: Falseto skip stages for debugging
3.3.10. See Also
Feature Extraction - Feature extraction presets
Configuration Reference - Complete parameter reference