File "torch_to_onnx.py", line 190, in
conver_bert_torch_to_onnx()
File "torch_to_onnx.py", line 104, in conver_bert_torch_to_onnx
sess = onnxruntime.InferenceSession(MODEL_ONNX_PATH)
File "/opt/conda/lib/python3.7/site-packages/onnxruntime/capi/onnxruntime_inference_collection.py", line 335, in init
self._create_inference_session(providers, provider_options, disabled_optimizers)
File "/opt/conda/lib/python3.7/site-packages/onnxruntime/capi/onnxruntime_inference_collection.py", line 379, in _create_inference_session
sess.initialize_session(providers, provider_options, disabled_optimizers)
onnxruntime.capi.onnxruntime_pybind11_state.Fail: [ONNXRuntimeError] : 1 : FAIL : Node (Squeeze_1169) Op (Squeeze) [ShapeInferenceError] Dimension of input 1 must be 1 instead of 768
有遇到过这样的问题吗
File "torch_to_onnx.py", line 190, in
conver_bert_torch_to_onnx()
File "torch_to_onnx.py", line 104, in conver_bert_torch_to_onnx
sess = onnxruntime.InferenceSession(MODEL_ONNX_PATH)
File "/opt/conda/lib/python3.7/site-packages/onnxruntime/capi/onnxruntime_inference_collection.py", line 335, in init
self._create_inference_session(providers, provider_options, disabled_optimizers)
File "/opt/conda/lib/python3.7/site-packages/onnxruntime/capi/onnxruntime_inference_collection.py", line 379, in _create_inference_session
sess.initialize_session(providers, provider_options, disabled_optimizers)
onnxruntime.capi.onnxruntime_pybind11_state.Fail: [ONNXRuntimeError] : 1 : FAIL : Node (Squeeze_1169) Op (Squeeze) [ShapeInferenceError] Dimension of input 1 must be 1 instead of 768
有遇到过这样的问题吗