NeuromorphicProcessorProject / snn_toolbox

Toolbox for converting analog to spiking neural networks (ANN to SNN), and running them in a spiking neuron simulator.
MIT License
360 stars 105 forks source link

can't not run the lenet5 keras examples #16

Closed liang10k closed 6 years ago

liang10k commented 6 years ago

hi, I meet the problem showed belows when I just run the command ' snntoolbox config -t ' ValueError: Dimensions must be equal, but are 6 and 3 for '01MaxPooling2D_6x12x12_1/add' (op: 'Add') with input shapes: [1,6,12,12], [1,3,12,24]. Could you please tell me how to fix this problem?

rbodo commented 6 years ago

Looks like the "image_data_format" in the keras config file is set to "channels_last". Needs to be "channels_first" for the examples to run.

liang10k commented 6 years ago

But how can I exactly change the "channels_last" to be "channel_first"? Otherwise, Where is the keras config file which you have metioned ? Do you mean the config file under “\snn_toolbox\examples\models\lenet5\keras“ ?

rbodo commented 6 years ago

No, it is the the keras.json configuration file; for more details see here: https://keras.io/backend/#kerasjson-details