Syntiant Audio Posterior Parameters Error

I’m training and deploying a simple model with the Syntiant board and some audio that I’ve collected myself - basically the audio dataset has binary labels; either “on” or “off.” The default 1D CNN trains fine and gives good accuracy, F1, etc.

When I run the “Find Posterior Parameters” routine under “Deployment” I get the following error message. I’m not adding any data augmentation, and I haven’t added any layers. Any idea what might be going on? A quick google search shows that this error often pops up when there’s a typo in the Keras code, but I couldn’t find anything obvious when switching to the Keras mode rather than the visual mode. Thanks for any help!

Copying neural network…
Copying neural network OK

Converting and evaluating unquantized neural network…
Traceback (most recent call last):
File “/app/app/get_posterior.py”, line 298, in
model.load_weights(weights_path)
File “/usr/local/lib/python3.6/site-packages/tensorflow/python/keras/engine/training.py”, line 2211, in load_weights
hdf5_format.load_weights_from_hdf5_group(f, self.layers)
File “/usr/local/lib/python3.6/site-packages/tensorflow/python/keras/saving/hdf5_format.py”, line 686, in load_weights_from_hdf5_group
’ layers.’)
ValueError: You are trying to load a weight file containing 3 layers into a model with 4 layers.

Hi @daveanderson130,

Could you share your project ID?
The Syntiant board has a fully connected NN architecture, it would not work with a 1D CNN.

Aurelien

I switched from using an Arduino Nano 33 BLE Sense to a Syntiant board - the default NN settings were meant for the Arduino board and are apparently unchanged when I switched to Syntiant features. I’ll just copy the architecture from this tutorial https://docs.edgeimpulse.com/docs/responding-to-your-voice-syntiant-rc-commands-go-stop.

Thank you for the help!

1 Like