-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
onnx inference problem #41
Comments
It is difficult to give you a specific hint. With Reset34 backbone 1024 channels should only occur after the context module - 514 channels is quite strange, it should not occur. Did you modify the code for the context module? If not, note that there is a lot of progress in all related libaries and frameworks. We would need more information on your environment. |
Hello @blueFeather111, I trained the ESANet based on custom dataset and classes, converted it to ONNX and I get the same error during execution:
My input shapes are also the same. I checked out the network with Netron but I don't really understand what it relates to. Did you make any progress on this? Thank you! |
I convert the model to onnx using the model_to_onnx.py, with the args:--dataset nyuv2 --last_ckpt ./trained_models/nyuv2/r34_NBt1D.pth
the model can be converted to model.onnx,
the input shape is :
NodeArg(name='rgb', type='tensor(float)', shape=[1, 3, 480, 640]) NodeArg(name='depth', type='tensor(float)', shape=[1, 1, 480, 640])
but when I use the onnx to do inference, using device = "cpu", not using cuda
error occurred:
onnxruntime.capi.onnxruntime_pybind11_state.Fail: [ONNXRuntimeError] : 1 : FAIL : Non-zero status code returned while running Conv node. Name:'' Status Message: Input channels C is not equal to kernel channels * group. C: 514 kernel channels: 1024 group: 1
I cannot understand why the channels does not match, can you give me a hint?
here is my inference code:
inputs shape:
'rgb': ndarray:(1, 3, 480, 640)
'depth': ndarray: (1, 1, 480, 640)
The text was updated successfully, but these errors were encountered: