PaddlePaddle / Paddle2ONNX

ONNX Model Exporter for PaddlePaddle
Apache License 2.0
738 stars 173 forks source link

导出paddleDetection中mask_rcnn为ONNX出错 #205

Open PhilCuriosity opened 3 years ago

PhilCuriosity commented 3 years ago

先使用PaddleDetection 中自带export_model 代码导出为inference_model image

然后使用下面命令转onnx: paddle2onnx --model_dir mask_rcnn_r50_fpn_2x --model_filename mask_rcnn_r50_fpn_2x/__model__ --params_filename mask_rcnn_r50_fpn_2x\__params__ --save_file onnx_file.onnx --opset_version 12 --enable_onnx_checker True

报错为:raise NotImplementedError(error_info) NotImplementedError: There's 4 ops are not supported yet =========== less_than =========== =========== logical_not =========== =========== conditional_block =========== =========== assign =========== 是我命令用的不对吗

PhilCuriosity commented 3 years ago

完整报错: d:\softwarework\anaconda3\lib\site-packages\urllib3\util\selectors.py:14: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3, and in 3.9 it will stop working from collections import namedtuple, Mapping d:\softwarework\anaconda3\lib\site-packages\urllib3_collections.py:2: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3, and in 3.9 it will stop working from collections import Mapping, MutableMapping Traceback (most recent call last): File "d:\softwarework\anaconda3\lib\runpy.py", line 194, in _run_module_as_main return _run_code(code, main_globals, None, File "d:\softwarework\anaconda3\lib\runpy.py", line 87, in _run_code exec(code, run_globals) File "D:\SoftwareWork\Anaconda3\Scripts\paddle2onnx.exe__main__.py", line 7, in File "d:\softwarework\anaconda3\lib\site-packages\paddle2onnx\command.py", line 136, in main program2onnx( File "d:\softwarework\anaconda3\lib\site-packages\paddle2onnx\command.py", line 107, in program2onnx p2o.program2onnx( File "d:\softwarework\anaconda3\lib\site-packages\paddle2onnx\convert.py", line 74, in program2onnx export_onnx(paddle_graph, save_file, opset_version, enable_onnx_checker) File "d:\softwarework\anaconda3\lib\site-packages\paddle2onnx\convert.py", line 31, in export_onnx onnx_graph = ONNXGraph.build(paddle_graph, opset_version, verbose) File "d:\softwarework\anaconda3\lib\site-packages\paddle2onnx\graph\onnx_graph.py", line 208, in build onnx_graph.build_op_nodes(paddle_graph.node_map) File "d:\softwarework\anaconda3\lib\site-packages\paddle2onnx\graph\onnx_graph.py", line 162, in build_op_nodes OpMapper.check_support_status(node_map, self.opset_version) File "d:\softwarework\anaconda3\lib\site-packages\paddle2onnx\op_mapper\op_mapper.py", line 144, in check_support_status raise NotImplementedError(error_info) NotImplementedError: There's 4 ops are not supported yet =========== less_than =========== =========== assign =========== =========== conditional_block =========== =========== logical_not ===========`

Channingss commented 3 years ago

@PhilCuriosity maskrcnn包含控制流op,目前paddle2onnx尚不支持。

PhilCuriosity commented 3 years ago

@PhilCuriosity maskrcnn包含控制流op,目前paddle2onnx尚不支持。 好的,谢谢