12. Troubleshooting

This section helps you resolve common issues and find answers to frequently asked questions.

12.3. Quick Fixes

Installation Issues

“ModuleNotFoundError” when importing

Ensure you’ve installed all components in editable mode:

pip install -e tinyml-modelmaker
pip install -e tinyml-tinyverse
pip install -e tinyml-modeloptimization/torchmodelopt
pip install -e tinyml-modelzoo
Python version errors

Tiny ML Tensorlab requires Python 3.10.x specifically:

python --version  # Should show 3.10.x

Use pyenv to manage Python versions.

Training Issues

CUDA out of memory

Reduce batch size in your config:

training:
  batch_size: 128  # Try smaller values
Training accuracy is poor
  • Try different feature extraction presets

  • Use the Goodness of Fit test to evaluate your dataset

  • Ensure proper data normalization

  • Try a larger model

Compilation Issues

Compilation fails with NPU errors

Ensure your model follows NPU constraints:

  • Channels must be multiples of 4

  • Kernel sizes within limits

  • See NPU Guidelines

12.4. Getting Help