Closed JakobVokac closed 2 years ago
Hi Jakob,
The spiking maxpool implementation uses the tensorflow max_pool_with_argmax_v2
function, which only supports dimension ordering "channels last". Can you set up your input model with channels last?
Yes. I rearranged the dataset and set the ordering to channels_last and that fixed it, thank you! Is there any specific reason the example says the parser requires channels_first? Could it lead to any other errors?
The external onnx2keras tool that is used under the hood for parsing your model only supported channels_first when I first implemented this frontend. Perhaps this restriction has been lifted now. If you don't get an error during parsing and the accuracy of the parsed model is the same as of the original model, then you should be fine.
I tried converting the CORnet-S (https://github.com/dicarlolab/CORnet/blob/master/cornet/cornet_s.py) model into an SNN model by following and modifying the MNIST Pytorch example (https://github.com/NeuromorphicProcessorProject/snn_toolbox/blob/master/examples/mnist_pytorch_INI.py). It was able to successfully port the ONNX model to Keras, build the parsed model, compile the parsed model and evaluate it on the dataset. Midway through building the spiking model, I get the following issue when building the MaxPooling2D layer:
The config file is:
The versions of the packages are: