Paddle2ONNX icon indicating copy to clipboard operation
Paddle2ONNX copied to clipboard

2 ops are not supported

Open wang971124 opened this issue 3 years ago • 15 comments

将paddleseg中的sfnetresnet50模型导出之后,将其转化为onnx时报错,提示缺少两个算子:there‘s 2 ops are not supported yet。希望官方尽快可以帮忙修复

wang971124 avatar Nov 19 '21 02:11 wang971124

报错: /home/imagex/anaconda3/envs/wang/lib/python3.8/site-packages/onnx/mapping.py:27: DeprecationWarning: np.object is a deprecated alias for the builtin object. To silence this warning, use object by itself. Doing this will not modify any behavior and is safe. Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations int(TensorProto.STRING): np.dtype(np.object) /home/imagex/anaconda3/envs/wang/lib/python3.8/site-packages/paddle2onnx/constant/dtypes.py:45: DeprecationWarning: np.bool is a deprecated alias for the builtin bool. To silence this warning, use bool by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use np.bool_ here. Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations np.bool: core.VarDesc.VarType.BOOL, /home/imagex/anaconda3/envs/wang/lib/python3.8/site-packages/paddle2onnx/constant/dtypes.py:46: DeprecationWarning: np.float is a deprecated alias for the builtin float. To silence this warning, use float by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use np.float64 here. Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations core.VarDesc.VarType.FP32: np.float, /home/imagex/anaconda3/envs/wang/lib/python3.8/site-packages/paddle2onnx/constant/dtypes.py:51: DeprecationWarning: np.bool is a deprecated alias for the builtin bool. To silence this warning, use bool by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use np.bool_ here. Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations core.VarDesc.VarType.BOOL: np.bool 2021-11-18 15:55:09 [WARNING] You are use develop version of paddlepaddle Traceback (most recent call last): File "/home/imagex/anaconda3/envs/wang/bin/paddle2onnx", line 8, in sys.exit(main()) File "/home/imagex/anaconda3/envs/wang/lib/python3.8/site-packages/paddle2onnx/command.py", line 148, in main program2onnx( File "/home/imagex/anaconda3/envs/wang/lib/python3.8/site-packages/paddle2onnx/command.py", line 114, in program2onnx p2o.program2onnx( File "/home/imagex/anaconda3/envs/wang/lib/python3.8/site-packages/paddle2onnx/convert.py", line 79, in program2onnx export_onnx(paddle_graph, save_file, opset_version, enable_onnx_checker, operator_export_type) File "/home/imagex/anaconda3/envs/wang/lib/python3.8/site-packages/paddle2onnx/convert.py", line 33, in export_onnx onnx_graph = ONNXGraph.build(paddle_graph, opset_version, operator_export_type, verbose) File "/home/imagex/anaconda3/envs/wang/lib/python3.8/site-packages/paddle2onnx/graph/onnx_graph.py", line 240, in build onnx_graph = ONNXGraph(paddle_graph, opset_version=opset_version, operator_export_type=operator_export_type) File "/home/imagex/anaconda3/envs/wang/lib/python3.8/site-packages/paddle2onnx/graph/onnx_graph.py", line 79, in init self.update_opset_version() File "/home/imagex/anaconda3/envs/wang/lib/python3.8/site-packages/paddle2onnx/graph/onnx_graph.py", line 194, in update_opset_version self.opset_version = OpMapper.get_recommend_opset_version(node_map, self.opset_version) File "/home/imagex/anaconda3/envs/wang/lib/python3.8/site-packages/paddle2onnx/op_mapper/op_mapper.py", line 127, in get_recommend_opset_version recommend_opset_version = OpMapper.check_support_status(node_map, opset_version, True) File "/home/imagex/anaconda3/envs/wang/lib/python3.8/site-packages/paddle2onnx/op_mapper/op_mapper.py", line 168, in check_support_status raise NotImplementedError(error_info) NotImplementedError: There's 2 ops are not supported yet

wang971124 avatar Nov 19 '21 02:11 wang971124

我用的sfnet_res50模型参数时在paddleseg官网提供的链接下载的

wang971124 avatar Nov 19 '21 02:11 wang971124

你好,具体的OP名称是?

yeliang2258 avatar Nov 19 '21 09:11 yeliang2258

不知道怎么查看呀

wang971124 avatar Nov 19 '21 09:11 wang971124

image 是从这里下载的模型参数,然后使用 image 导出报错

wang971124 avatar Nov 19 '21 09:11 wang971124

你好,报错的log信息最后会打印出那些op不支持的

yeliang2258 avatar Nov 19 '21 09:11 yeliang2258

你好,报错的log信息最后会打印出那些op不支持的

/home/imagex/anaconda3/envs/wang/lib/python3.8/site-packages/onnx/mapping.py:27: DeprecationWarning: np.object is a deprecated alias for the builtin object. To silence this warning, use object by itself. Doing this will not modify any behavior and is safe. Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations int(TensorProto.STRING): np.dtype(np.object) /home/imagex/anaconda3/envs/wang/lib/python3.8/site-packages/paddle2onnx/constant/dtypes.py:45: DeprecationWarning: np.bool is a deprecated alias for the builtin bool. To silence this warning, use bool by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use np.bool_ here. Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations np.bool: core.VarDesc.VarType.BOOL, /home/imagex/anaconda3/envs/wang/lib/python3.8/site-packages/paddle2onnx/constant/dtypes.py:46: DeprecationWarning: np.float is a deprecated alias for the builtin float. To silence this warning, use float by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use np.float64 here. Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations core.VarDesc.VarType.FP32: np.float, /home/imagex/anaconda3/envs/wang/lib/python3.8/site-packages/paddle2onnx/constant/dtypes.py:51: DeprecationWarning: np.bool is a deprecated alias for the builtin bool. To silence this warning, use bool by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use np.bool_ here. Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations core.VarDesc.VarType.BOOL: np.bool 2021-11-18 15:55:09 [WARNING] You are use develop version of paddlepaddle Traceback (most recent call last): File "/home/imagex/anaconda3/envs/wang/bin/paddle2onnx", line 8, in sys.exit(main()) File "/home/imagex/anaconda3/envs/wang/lib/python3.8/site-packages/paddle2onnx/command.py", line 148, in main program2onnx( File "/home/imagex/anaconda3/envs/wang/lib/python3.8/site-packages/paddle2onnx/command.py", line 114, in program2onnx p2o.program2onnx( File "/home/imagex/anaconda3/envs/wang/lib/python3.8/site-packages/paddle2onnx/convert.py", line 79, in program2onnx export_onnx(paddle_graph, save_file, opset_version, enable_onnx_checker, operator_export_type) File "/home/imagex/anaconda3/envs/wang/lib/python3.8/site-packages/paddle2onnx/convert.py", line 33, in export_onnx onnx_graph = ONNXGraph.build(paddle_graph, opset_version, operator_export_type, verbose) File "/home/imagex/anaconda3/envs/wang/lib/python3.8/site-packages/paddle2onnx/graph/onnx_graph.py", line 240, in build onnx_graph = ONNXGraph(paddle_graph, opset_version=opset_version, operator_export_type=operator_export_type) File "/home/imagex/anaconda3/envs/wang/lib/python3.8/site-packages/paddle2onnx/graph/onnx_graph.py", line 79, in init self.update_opset_version() File "/home/imagex/anaconda3/envs/wang/lib/python3.8/site-packages/paddle2onnx/graph/onnx_graph.py", line 194, in update_opset_version self.opset_version = OpMapper.get_recommend_opset_version(node_map, self.opset_version) File "/home/imagex/anaconda3/envs/wang/lib/python3.8/site-packages/paddle2onnx/op_mapper/op_mapper.py", line 127, in get_recommend_opset_version recommend_opset_version = OpMapper.check_support_status(node_map, opset_version, True) File "/home/imagex/anaconda3/envs/wang/lib/python3.8/site-packages/paddle2onnx/op_mapper/op_mapper.py", line 168, in check_support_status raise NotImplementedError(error_info) NotImplementedError: There's 2 ops are not supported yet

wang971124 avatar Nov 19 '21 09:11 wang971124

哪些OP不支持,输出在整个屏幕在最下面

jiangjiajun avatar Nov 19 '21 09:11 jiangjiajun

File "/home/imagex/anaconda3/envs/wang/bin/paddle2onnx", line 8, in sys.exit(main()) File "/home/imagex/anaconda3/envs/wang/lib/python3.8/site-packages/paddle2onnx/command.py", line 148, in main program2onnx( File "/home/imagex/anaconda3/envs/wang/lib/python3.8/site-packages/paddle2onnx/command.py", line 114, in program2onnx p2o.program2onnx( File "/home/imagex/anaconda3/envs/wang/lib/python3.8/site-packages/paddle2onnx/convert.py", line 79, in program2onnx export_onnx(paddle_graph, save_file, opset_version, enable_onnx_checker, operator_export_type) File "/home/imagex/anaconda3/envs/wang/lib/python3.8/site-packages/paddle2onnx/convert.py", line 33, in export_onnx onnx_graph = ONNXGraph.build(paddle_graph, opset_version, operator_export_type, verbose) File "/home/imagex/anaconda3/envs/wang/lib/python3.8/site-packages/paddle2onnx/graph/onnx_graph.py", line 240, in build onnx_graph = ONNXGraph(paddle_graph, opset_version=opset_version, operator_export_type=operator_export_type) File "/home/imagex/anaconda3/envs/wang/lib/python3.8/site-packages/paddle2onnx/graph/onnx_graph.py", line 79, in init self.update_opset_version() File "/home/imagex/anaconda3/envs/wang/lib/python3.8/site-packages/paddle2onnx/graph/onnx_graph.py", line 194, in update_opset_version self.opset_version = OpMapper.get_recommend_opset_version(node_map, self.opset_version) File "/home/imagex/anaconda3/envs/wang/lib/python3.8/site-packages/paddle2onnx/op_mapper/op_mapper.py", line 127, in get_recommend_opset_version recommend_opset_version = OpMapper.check_support_status(node_map, opset_version, True) File "/home/imagex/anaconda3/envs/wang/lib/python3.8/site-packages/paddle2onnx/op_mapper/op_mapper.py", line 168, in check_support_status raise NotImplementedError(error_info) NotImplementedError: There's 2 ops are not supported yet

wang971124 avatar Nov 20 '21 01:11 wang971124

用户您好,Paddle2ONNX遇到不支持的OP会在最后打印出对应的OP名称,您可以找一下,然后将完整的信息贴出来,加快我们的处理进度,谢谢。

yeliang2258 avatar Nov 22 '21 08:11 yeliang2258

grid_sampler linspace

wang971124 avatar Nov 22 '21 09:11 wang971124

收到,我们会尽快排期进行这两个OP的支持

yeliang2258 avatar Nov 23 '21 03:11 yeliang2258

Hi, @wang971124 我们准备了一份简单的问题调研(半分钟可完成),如有时间可帮忙完成调研,帮助Paddle2ONNX做得更好, 谢谢~ https://iwenjuan.baidu.com/?code=r8hu2s

jiangjiajun avatar Nov 25 '21 06:11 jiangjiajun

select_input conditional_block 这两个算子不支持

cookiewang1998 avatar Jul 25 '22 05:07 cookiewang1998

您好,我遇到了类似的问题,是以下两个算子不支持: less_than where

Change0028 avatar Mar 05 '24 01:03 Change0028