Version: onnx-mxnet (0.4.2)
Breaking file: sequence-tiny.zip
I'm getting the following error when trying to import my ONNX model:
Invalid Parameter format for shape expect Shape(tuple) but value='', in operator Reshape(name="", shape="")
The model has a conv net that feeds into a GRU. The model is built for OCR, so it turns the horizontal axis into the sequence axis.
These are the two lines of PyTorch code that cause the error:
x = x.transpose(1, 2).contiguous() # swap NFilters, Width
x = x.view(x.size(0), x.size(1), -1) # squash NFilters x Height into one dimension
Specifically, the x.view is what causes the error
During the PyTorch -> ONNX export, the relevant breaking lines are:
%27 : Float(1, 32, 32, 11) = onnx::Relu(%26), scope: Sequence/PureConv[conv]/Sequential[all]/ReLU[2]
%28 : Float(1, 32, 32, 11) = onnx::Transpose[perm=[0, 2, 1, 3]](%27), scope: Sequence
%29 : Dynamic = onnx::Constant[value= 1 32 -1 [ CPULongTensor{3} ]](), scope: Sequence
%30 : Float(1, 32, 352) = onnx::Reshape(%28, %29), scope: Sequence
Any ideas what's going wrong here?