Training locally

I am using an audio classification model which would take very long time (~50 mins/epoch) on Edge Impulse studio (NN classifier). Since Edge Impulse studio community projects are executed only on CPU and have upper time limits, so I have downloaded the iPython Notebook and completed the training on local computer with GPU (~30s/epoch) within 40 mins. Now I want to make a deployment package for Arduino Nano BLE. How can I achieve this?

Hi @naveen, so not a super trivial way as we don’t support importing the model back into Edge Impulse but:

  1. Train a quick model (e.g. single epoch) in Edge Impulse.
  2. Export as Arduino library and disable EON.
  3. Convert your locally trained model into a tflite file (e.g. named trained.tflite).
  4. Convert the model into a byte array and overwrite current model:
xxd -i trained.tflite > tflite-model/tflite-trained.h
sed -i "s/unsigned char/const unsigned char/g" tflite-model/tflite-trained.h
3 Likes

Thanks @janjongboom for the suggestion!

2 Likes