faster rcnn转onnx报错:
that if the size of dimension 1 of the input is not 1, the ONNX model will return an error
UserWarning: This model contains a squeeze operation on dimension 1 on an input with unknown shape. Note that if the size of dimension 1 of the input is not 1, the ONNX model will return an error. Opset version 11 supports squeezing on non-singleton dimensions, it is recommended to export this model using opset version 11 or higher.
"version 11 or higher.")
Traceback (most recent call last):
File "F:/project/jushi/tensorrt-onnx-fasterrcnn-fpn-roialign-master/test/x01export_FasterRCNN_onnx.py", line 49, in <module>
dynamic_input_shape=False)
File "D:\Users\Administrator\miniconda3\envs\tf1x\lib\site-packages\onnxsim\onnx_simplifier.py", line 534, in simplify
onnx.checker.check_model(model)
File "D:\Users\Administrator\miniconda3\envs\tf1x\lib\site-packages\onnx\checker.py", line 91, in check_model
C.check_model(model.SerializeToString())
onnx.onnx_cpp2py_export.checker.ValidationError: No Op registered for GreaterOrEqual with domain_version of 12
解决方法:
原因torch 1.7.0版本,升级为1.10版本就ok了。
torch==1.10.0
torchvision==0.11.1
版权说明 : 本文为转载文章, 版权归原作者所有 版权申明
原文链接 : https://blog.csdn.net/jacke121/article/details/126197056
内容来源于网络,如有侵权,请联系作者删除!