that if the size of dimension 1 of the input is not 1, the ONNX model will return an error

x33g5p2x  于2022-08-17 转载在 其他  
字(1.1k)|赞(0)|评价(0)|浏览(469)

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

相关文章

微信公众号

最新文章

更多