Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

onnx模型转换成paddle,发生报错:AssertionError: only dilations = 0 is supported以及报错Exception: convert failed node:_stem_pool_MaxPool_output_0, op_type is MaxPool #1108

Open
2 tasks
17858569330 opened this issue Jan 4, 2025 · 0 comments

Comments

@17858569330
Copy link

17858569330 commented Jan 4, 2025

感谢您参与 X2Paddle 社区! 问题模版为了 X2Paddle 能更好的迭代,例如新功能发布、 RoadMaps 和错误跟踪. 😸

问题描述

D:\DESKTOP\CVNet-main
x2paddle --framework=onnx --model=CVNet_Rerank.onnx --save_dir=pd_model
model ir_version: 6, op version: 11
Shape inferencing ...
[WARNING] Incomplete symbolic shape inference
Shape inferenced.
Now, onnx2paddle support convert onnx model opset_verison [7, 8, 9, 10, 11, 12, 13, 14, 15], opset_verison of your onnx model is 11.
Total nodes: 1806
Nodes converting ...
Converting node 1050 ... Traceback (most recent call last):
File "C:\Users\msipc.conda\envs\sam\Lib\site-packages\x2paddle\op_mapper\onnx2paddle\opset_legacy.py", line 111, in run_mapping
res = func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\msipc.conda\envs\sam\Lib\site-packages\x2paddle\op_mapper\onnx2paddle\opset_legacy.py", line 1977, in MaxPool
assert node.get_attr(
^^^^^^^^^^^^^^
AssertionError: only dilations = 0 is supported

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "", line 198, in _run_module_as_main
File "", line 88, in run_code
File "C:\Users\msipc.conda\envs\sam\Scripts\x2paddle.exe_main
.py", line 7, in
File "C:\Users\msipc.conda\envs\sam\Lib\site-packages\x2paddle\convert.py", line 501, in main
onnx2paddle(args.model,
File "C:\Users\msipc.conda\envs\sam\Lib\site-packages\x2paddle\convert.py", line 316, in onnx2paddle
mapper = ONNXOpMapper(model)
^^^^^^^^^^^^^^^^^^^
File "C:\Users\msipc.conda\envs\sam\Lib\site-packages\x2paddle\op_mapper\onnx2paddle\onnx_op_mapper.py", line 53, in init
func(node)
File "C:\Users\msipc.conda\envs\sam\Lib\site-packages\x2paddle\op_mapper\onnx2paddle\opset_legacy.py", line 113, in run_mapping
raise Exception("convert failed node:{}, op_type is {}".format(
Exception: convert failed node:_stem_pool_MaxPool_output_0, op_type is MaxPool

具体信息

需要将CVNet的模型权重文件转换成paddle。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant