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 报错导致模型转换不成功 #790

Open
3 tasks
StrugglingForBetter opened this issue May 9, 2022 · 3 comments
Open
3 tasks

onnx转paddle 报错导致模型转换不成功 #790

StrugglingForBetter opened this issue May 9, 2022 · 3 comments
Assignees
Labels

Comments

@StrugglingForBetter
Copy link

StrugglingForBetter commented May 9, 2022

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

问题描述

使用pip install x2paddle安装成功
然后使用指令 x2paddle --framework=onnx --model=model.onnx -save_dir=pd_model
onnx转paddle不成功,尝试用onnxsim简化,简化过的onnx还是转换paddle模型失败

  • 错误信息
    ValueError: (InvalidArgument) Broadcast dimension mismatch. Operands could not be broadcast together with the shape of X = [1, 256, 49, 33] and the shape of Y = [1, 256, 48, 32]. Received [49] in X is not equal to [48] in Y at i:2.
    [Hint: Expected x_dims_array[i] == y_dims_array[i] || x_dims_array[i] <= 1 || y_dims_array[i] <= 1 == true, but received x_dims_array[i] == y_dims_array[i] || x_dims_array[i] <= 1 || y_dims_array[i] <= 1:0 != true:1.] (at C:\home\workspace\Paddle_release\paddle/fluid/operators/elementwise/elementwise_op_function.h:240)
    [operator < elementwise_add > error]
  • 错误截图

具体信息

middle_img_v2_6a1922e5-58f6-4948-9c09-526a3dff0c6g

  • 转换模型后用处

    • 使用 Paddle 框架/ PaddleInference 推理预测
    • 使用 Paddle-Lite 做移动端推理
    • 转换预训练参数,再使用 Paddle 进行模型开发
  • 模型来源

  • 应用场景
    用于PC端 X64

  • 版本信息
    PaddlePaddle => ❔
    X2Paddle => ❔
    来源框架版本(PyTorch/TF/ONNX/Caffe) => ❔

  • 您的联系方式(邮箱/微信/电话)

@wjj19950828
Copy link
Collaborator

@StrugglingForBetter 麻烦描述一下您的业务场景、部署场景,然后通过百度云提供一下ONNX模型吧~

另外这有一份调查问卷,帮助X2Paddle更好的迭代,感谢~:https://iwenjuan.baidu.com/?code=npyd51

@wjj19950828 wjj19950828 self-assigned this May 9, 2022
@StrugglingForBetter
Copy link
Author

StrugglingForBetter commented May 9, 2022

业务场景:计算机视觉领域
部署场景: 部署到X64,Win10

@wjj19950828
Copy link
Collaborator

@StrugglingForBetter 您好,目前bug已经修复,拉去develop代码,重新安装X2Paddle即可

pip uninstall x2paddle
git clone xxxx
cd X2Paddle
python setup.py install

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

No branches or pull requests

2 participants