Paddle2ONNX icon indicating copy to clipboard operation
Paddle2ONNX copied to clipboard

Failure of paddle2onnx

Open Jason-wwww opened this issue 1 year ago • 13 comments

请将下面信息填写完整,便于我们快速解决问题,谢谢!

问题描述 Failed to convert model quantized by paddleslim to onnx.

log of failure: [Paddle2ONNX] Start to parse PaddlePaddle model... [Paddle2ONNX] Model file path: ./save_quant_test/model.pdmodel [Paddle2ONNX] Paramters file path: ./save_quant_test/model.pdiparams [Paddle2ONNX] Start to parsing Paddle model... [Paddle2ONNX] [Info] The Paddle model is a quantized model. [Paddle2ONNX] Oops, there are some operators not supported yet, including pad, [ERROR] Due to the unsupported operators, the conversion is aborted. Aborted (core dumped)

更多信息 :

  • 用于部署的推理引擎: TensorRT
  • 为什么需要转换为ONNX格式:Need to deploy.
  • Paddle2ONNX版本: 1.0.6
  • PaddleSlim: 2.4.2
  • 你的联系方式(Email/Wechat/Phone):

报错截图

其他信息

Jason-wwww avatar Mar 27 '23 03:03 Jason-wwww

请问需要部署的是什么模型呢?

yeliang2258 avatar Mar 27 '23 06:03 yeliang2258

Deploy with TensorRT

Jason-wwww avatar Mar 27 '23 07:03 Jason-wwww

What model do you want to deploy with TensorRT?

yeliang2258 avatar Mar 27 '23 09:03 yeliang2258

What model do you want to deploy with TensorRT?

I quantized MobilenetV1 with PaddleSlim, and now I want to convert the quantized model to onnx and got the error.

Jason-wwww avatar Mar 27 '23 09:03 Jason-wwww

What is the source of your model? Your model contains an unsupported pad OP and the conversion failed. The following model can be converted successfully. https://bj.bcebos.com/paddlehub/fastdeploy/mobilenetv1_ssld_ptq.tar

yeliang2258 avatar Mar 27 '23 11:03 yeliang2258

What is the source of your model? Your model contains an unsupported pad OP and the conversion failed. The following model can be converted successfully. https://bj.bcebos.com/paddlehub/fastdeploy/mobilenetv1_ssld_ptq.tar What kind of pad ops are not supported, I did not change the network. I trained the model with tensorflow and convert tf model to onnx and compressed the model with paddleslim. And I want to convert the saved model to onnx.

Jason-wwww avatar Mar 28 '23 07:03 Jason-wwww

What is the source of your model? Your model contains an unsupported pad OP and the conversion failed. The following model can be converted successfully. https://bj.bcebos.com/paddlehub/fastdeploy/mobilenetv1_ssld_ptq.tar

Hi, what kind of pd ops are not supported.

Jason-wwww avatar Mar 29 '23 02:03 Jason-wwww

pad OP

yeliang2258 avatar Mar 29 '23 07:03 yeliang2258

pad OP

You mean the normal pad OP is not supported by paddle2onnx ?

Jason-wwww avatar Mar 30 '23 07:03 Jason-wwww

pad OP is a new op of paddle, it should be pad2d or pad3d before

yeliang2258 avatar Mar 30 '23 11:03 yeliang2258

pad OP is a new op of paddle, it should be pad2d or pad3d before

I just trained MobilenetV1 with only changes to input (224->350) & output, and add a GAP, if there are some pad ops are not supported, why the model in examples can be converted easily ?

Jason-wwww avatar Mar 30 '23 12:03 Jason-wwww

https://github.com/PaddlePaddle/Paddle2ONNX/pull/1069 Add Pad op, please pull this PR to convert

yeliang2258 avatar Mar 30 '23 12:03 yeliang2258

#1069 Add Pad op, please pull this PR to convert

It works, thanks. When it will be released ?

Jason-wwww avatar Apr 01 '23 10:04 Jason-wwww