-
Notifications
You must be signed in to change notification settings - Fork 56
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
onnxruntime 转换报错 #40
Comments
可以使用optimum-cli进行转换 |
您好,我执行第一个作者的命令可以转换成功,但是在测试的时候会提示 onnxruntime.capi.onnxruntime_pybind11_state.InvalidArgument: [ONNXRuntimeError] : 2 : INVALID_ARGUMENT : Invalid Feed Input Name:attention_mask 采用optimum-cli转换的话,是这个问题 UnboundLocalError: local variable 'all_files' referenced before assignment |
这个问题我没遇到过,哈哈。你可以更换一下torch或者opset的版本试一下。 |
请教大佬,后面有解决吗?遇到同样的问题 |
执行命令:python -m transformers.onnx --model weights/hand-write --feature=vision2seq-lm onnx/
transformers: 4.30.2
onnxrun:1.14.1
onnxruntime.capi.onnxruntime_pybind11_state.RuntimeException: [ONNXRuntimeError] : 6 : RUNTIME_EXCEPTION : Non-zero status code returned while running Reshape node. Name:'Reshape_53' Status Message: /onnxruntime_src/onnxruntime/core/providers/cpu/tensor/reshape_helper.h:40 onnxruntime::ReshapeHelper::ReshapeHelper(const onnxruntime::TensorShape&, onnxruntime::TensorShapeVector&, bool) gsl::narrow_cast<int64_t>(input_shape.Size()) == size was false. The input tensor cannot be reshaped to the requested shape. Input shape:{3,578,384}, requested shape:{2,578,6,64}
The text was updated successfully, but these errors were encountered: