Closed annahambi closed 2 years ago
It seems the onnx2keras tool inserts a Lambda layer before the Flatten layer when porting your model from pytorch to onnx to keras. The toolbox can't parse this Lambda layer. Maybe try to find out why this layer is added and how you can prevent it.
Hi @rbodo, thanks for the fast response! I think the following is happening:
I don't know how to resolve this or how one could prevent onnx2keras from inserting the additional layer.
Can you check the console output from onnx2keras? If I remember correctly there should be a message indicating why Lambda was added.
Hi @rbodo, I have changed the issue above to show the full output when I try to run the conversion. There is no information from the onnx2keras as far as I can see...
Hmm, there might be a verbosity setting in onnx2keras now. Regardless - I won't be able to help debug / fix the underlying issue, but if you are not bound to using pytorch then a quick workaround would be to define your model in Keras directly. Sorry I can't be of more help!
During the SNN conversion of the model as defined below (see Extract from the Model Definition) the following key error (see Error) is raised on layer Flatten. Do you have any idea where I am going wrong?
Error
Extract from the Model Definition