You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Known issue: Conversion of CNNs for use with pyNN (Nest, Brian, ...) simulators does not work with input models trained using keras versions > 2.1.6.
#25
The conversion of CNNs for use with pyNN (Nest, Brian, ...) simulators works with models trained using a keras version <= 2.1.6 (like the LeNet example provided with the toolbox), but not with models trained on newer keras versions. I believe the reason is that Keras changed something with the Flatten layer (you can now specify the image data format within the Flatten layer). The convolution layers are converted fine even with a new keras model, but the converted dense layers do not match the original ANN layers any more.
Workaround:
An input model trained with the latest keras version will work fine on pyNN simulators if the image_data_format was set to channels_first in the keras config file, and the argument image_data_format=channels_last was passed to the Flatten layer during training.
This issue can probably be fixed by adapting this for-loop:
The conversion of CNNs for use with pyNN (Nest, Brian, ...) simulators works with models trained using a keras version <= 2.1.6 (like the LeNet example provided with the toolbox), but not with models trained on newer keras versions. I believe the reason is that Keras changed something with the Flatten layer (you can now specify the image data format within the Flatten layer). The convolution layers are converted fine even with a new keras model, but the converted dense layers do not match the original ANN layers any more.
Workaround:
An input model trained with the latest keras version will work fine on pyNN simulators if the
image_data_format
was set tochannels_first
in the keras config file, and the argumentimage_data_format=channels_last
was passed to theFlatten
layer during training.This issue can probably be fixed by adapting this for-loop:
snn_toolbox/snntoolbox/simulation/utils.py
Line 1189 in 4d8643b
Unfortunately, I won't be able to tackle this compatibility issue any time soon. Any contribution would be appreciated.
Note: The INI simulator is not affected.
The text was updated successfully, but these errors were encountered: