-
Notifications
You must be signed in to change notification settings - Fork 181
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
Type 'tensor(float16)' of input parameter of operator (Resize) in node () is invalid #361
Comments
We have the same problem. Will this problem be approached in the near future? |
It would save me some time if you would add an example but float16 should be supported with maybe a couple if fixes. |
@maaft hello i have the same question ,after i Convert the model from float32 to float 16, i checked this operator Resize, It was originally a torch.nn.functional.interpolate function |
The latest versions of ONNX do support Resize for float16. Which version of packages onnx, onnxruntime, torch do you use? |
onnxruntime=1.8.1, torch==1.9.0,python=3.7 |
I'll need the version of onnx packages and the error message you get. |
onnx=1.10.1 ,onnxmltools-1.9.1 |
onnxruntime does not implement the full ONNX specifications. This page CPU execution provider lists all available types and operator. Even if Resize has an implementation for float16, I guess others operators will fail. Is there any way you can switch to float32? However, this is an issue for onnxruntime or pytorch. |
The pytorch model can be converted to onnxfloat32, it works,i can use it to infer . The float32 can be converted to float16 using onnxmltools,it works , but the onnxfloat16 It reports that error. |
This function is implemented in onnxconverter_common. It assumes all operators in graph have a runtime which supports float16. That's not the case for onnxruntime. The model may be valid but cannot be run unless onnxruntime supports float16 for all operators in your graph. You need to use a different runtime or raise an issue on onnxruntime repository with the list of operators you need to support float16. |
AFAIK Resize doesn't support float16 and should therefore be ignored during conversion from float to float16.
The text was updated successfully, but these errors were encountered: