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 104 forks source link

ONNX model could not be ported to Keras.Mismatched elements 100% #130

Closed hxliu4mcgill closed 1 year ago

hxliu4mcgill commented 1 year ago

I encounter an issue when trying to convert a pretrained Pytorch Alexnet model to SNN. I read the code and found that pytorch_input_lib.py is used to convert Pytorch model to Keras model. But the error comes up as below: image What should I do? Thanks!

rbodo commented 1 year ago

You should be able to fix the error by adding ZeroPadding layers as suggested in the console output.

Please see also this related issue: #96