Error on Find posterior parameters

Hello,

I have cloned this to try Edge Impulse on TinyML: https://studio.edgeimpulse.com/public/42868/latest

After completing the training, clicked Deployment on the left menu, selected Syntiant TinyML, then started Find posterior parameters, but it is not going well with log below.

Can you please help how I can move forward?

Thanks,
Tom

Creating job… OK (ID: 2119963)

Copying neural network…
Copying neural network OK

Job started
Waiting for S3 mount to become available…
Extracting model…
Extracting model OK

Calculating posterior parameters, all labels: [‘go’, ‘stop’, ‘z_openset’] target words: [‘go’, ‘stop’] …

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 281, in
ei_model = tf.keras.models.load_model(args.saved_model)
File “/usr/local/lib/python3.6/site-packages/tensorflow/python/keras/saving/save.py”, line 182, in load_model
return hdf5_format.load_model_from_hdf5(filepath, custom_objects, compile)
File “/usr/local/lib/python3.6/site-packages/tensorflow/python/keras/saving/hdf5_format.py”, line 178, in load_model_from_hdf5
custom_objects=custom_objects)
File “/usr/local/lib/python3.6/site-packages/tensorflow/python/keras/saving/model_config.py”, line 55, in model_from_config
return deserialize(config, custom_objects=custom_objects)
File “/usr/local/lib/python3.6/site-packages/tensorflow/python/keras/layers/serialization.py”, line 175, in deserialize
printable_module_name=‘layer’)
File “/usr/local/lib/python3.6/site-packages/tensorflow/python/keras/utils/generic_utils.py”, line 358, in deserialize_keras_object
list(custom_objects.items())))
File “/usr/local/lib/python3.6/site-packages/tensorflow/python/keras/engine/sequential.py”, line 487, in from_config
custom_objects=custom_objects)
File “/usr/local/lib/python3.6/site-packages/tensorflow/python/keras/layers/serialization.py”, line 175, in deserialize
printable_module_name=‘layer’)
File “/usr/local/lib/python3.6/site-packages/tensorflow/python/keras/utils/generic_utils.py”, line 360, in deserialize_keras_object
return cls.from_config(cls_config)
File “/usr/local/lib/python3.6/site-packages/tensorflow/python/keras/engine/base_layer.py”, line 697, in from_config
return cls(**config)
File “/usr/local/lib/python3.6/site-packages/tensorflow/python/keras/layers/noise.py”, line 60, in init
super(GaussianNoise, self).init(**kwargs)
File “/usr/local/lib/python3.6/site-packages/tensorflow/python/training/tracking/base.py”, line 457, in _method_wrapper
result = method(self, *args, **kwargs)
File “/usr/local/lib/python3.6/site-packages/tensorflow/python/keras/engine/base_layer.py”, line 318, in init
generic_utils.validate_kwargs(kwargs, allowed_kwargs)
File “/usr/local/lib/python3.6/site-packages/tensorflow/python/keras/utils/generic_utils.py”, line 778, in validate_kwargs
raise TypeError(error_message, kwarg)
TypeError: (‘Keyword argument not understood:’, ‘seed’)
Attached to job 2119963…
Attached to job 2119963…
Attached to job 2119963…
Attached to job 2119963…
Attached to job 2119963…
Attached to job 2119963…
Attached to job 2119963…
Attached to job 2119963…
Attached to job 2119963…

Taking a look this project now!

Hi @tominoue,

I was able to reproduce these errors on my side, I have alerted our engineering team and will post when we deploy a fix!

Thank you!
– Jenny

Hi @tominoue it’s an issue with data augmentation. If you disable it on the NN Classifier page this’ll work. Investigating with the ML team on why that’s happening :slight_smile:

Hi @jenny, thank you for checking!

Hi @janjongboom, thank you for the update. The project is using Add noise=Low, Mask time bands=Low as the data augmentation. Is there any detailed description for these two? It says random noise, so I guess it is white noise, but what is the volume and length of the noise? Is there any figure describing how “Mask time bands” works? If I can understand these details, then I think I can disable them as the workaround.

Hi @tominoue

  • Noise => adds gaussian noise to the spectrograms at random during training.
  • Mask time bands => randomly trash time bands (if you look at the spectrogram the horizontal axes represents time).

In theory this can make your model more resilient as it will overfit less (as the data changes every time) and should work better on device (as data might be more noisy there).

However, since our last TensorFlow update last week the gaussian noise leaks into the Syntiant code, which cannot handle it. We’re pushing a fix later this week, but until then disabling the ‘noise’ data augmentation option will solve it too.

We’ve pushed a fix for this now (will go live tomorrow), so you can add noise augmentation again for Syntiant models!

Thank you for fixing this quickly. I could use augmentation without any issue!