You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
WARNING: The shape inference of prim::Constant type is missing, so it may result in wrong shape inference for the exported graph. Please consider adding it in symbolic function.
WARNING: The shape inference of prim::Constant type is missing, so it may result in wrong shape inference for the exported graph. Please consider adding it in symbolic function.
Successfully exported ONNX model: /workspace/log_7cls_det/salience_detr_swin_l_480_800/2024-10-15-00_53_43/best_ap_save.onnx
Uncaught exception
Traceback (most recent call last):
File "/workspace/train_code/Salience-DETR-main/tools/pytorch2onnx.py", line 145, in <module>
pytorch2onnx()
File "/workspace/train_code/Salience-DETR-main/tools/pytorch2onnx.py", line 132, in pytorch2onnx
onnx_model = ONNXDetector(args.save_file)
File "/workspace/train_code/Salience-DETR-main/tools/pytorch2onnx.py", line 21, in __init__
self.session = onnxruntime.InferenceSession(
File "/root/miniconda3/lib/python3.9/site-packages/onnxruntime/capi/onnxruntime_inference_collection.py", line 360, in __init__
self._create_inference_session(providers, provider_options, disabled_optimizers)
File "/root/miniconda3/lib/python3.9/site-packages/onnxruntime/capi/onnxruntime_inference_collection.py", line 397, in _create_inference_session
sess = C.InferenceSession(session_options, self._model_path, True, self._read_config_from_model)
onnxruntime.capi.onnxruntime_pybind11_state.InvalidGraph: [ONNXRuntimeError] : 10 : INVALID_GRAPH : Load model from /workspace/log_7cls_det/salience_detr_swin_l_480_800/2024-10-15-00_53_43/best_ap_save.onnx failed:This is an invalid model. Type Error: Type 'tensor(int32)' of input parameter (onnx::TopK_19989) of operator (TopK) in node (TopK_16698) is invalid.
补充信息
No response
The text was updated successfully, but these errors were encountered:
Question
onnx模型转成功了,但是后续的verify过程导入onnx模型报错。想问下该怎么解决?
补充信息
No response
The text was updated successfully, but these errors were encountered: