PaddleNLP icon indicating copy to clipboard operation
PaddleNLP copied to clipboard

paddlenlp.transformers系列模型转ONNX报错

Open 471417367 opened this issue 2 years ago • 3 comments

下的模型有5个文件: model_config.json model_state.pdparams sentencepiece.bpe.model tokenizer_config.json training_args.bin

环境: paddle2onnx==0.9.1 paddlenlp==2.2.4

运行命令: paddle2onnx --model_dir PP-Layout_v1.0_ser_pretrained --model_filename sentencepiece.bpe.model --params_filename model_state.pdparams --save_file ser_pretrained.onnx --opset_version 12

报错: Traceback (most recent call last): File "/usr/local/bin/paddle2onnx", line 8, in sys.exit(main()) File "/usr/local/lib/python3.6/dist-packages/paddle2onnx/command.py", line 195, in main input_shape_dict=input_shape_dict) File "/usr/local/lib/python3.6/dist-packages/paddle2onnx/command.py", line 120, in program2onnx params_filename=params_filename) File "", line 2, in load_inference_model File "/usr/local/lib/python3.6/dist-packages/paddle/fluid/wrapped_decorator.py", line 25, in impl return wrapped_func(*args, **kwargs) File "/usr/local/lib/python3.6/dist-packages/paddle/fluid/framework.py", line 238, in impl return func(*args, **kwargs) File "/usr/local/lib/python3.6/dist-packages/paddle/fluid/io.py", line 1592, in load_inference_model program = Program.parse_from_string(program_desc_str) File "/usr/local/lib/python3.6/dist-packages/paddle/fluid/framework.py", line 5312, in parse_from_string p.desc = core.ProgramDesc(binary_str) ValueError: (InvalidArgument) Failed to parse program_desc from binary string. [Hint: Expected desc_.ParseFromString(binary_str) == true, but received desc_.ParseFromString(binary_str):0 != true:1.] (at /paddle/paddle/fluid/framework/program_desc.cc:103)

471417367 avatar Apr 02 '22 07:04 471417367

您好,LayoutLM 系列模型我们还没有支持转 ONNX。

yingyibiao avatar Apr 02 '22 12:04 yingyibiao

谢谢

yingyibiao @.***> 于2022年4月2日周六 20:16写道:

您好,LayoutLM 系列模型我们还没有支持转 ONNX。

— Reply to this email directly, view it on GitHub https://github.com/PaddlePaddle/PaddleNLP/issues/1890#issuecomment-1086627638, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALQZU4RVM6UAMKJSZYWA2YTVDA3BDANCNFSM5SKQUM7A . You are receiving this because you authored the thread.Message ID: @.***>

471417367 avatar Apr 08 '22 02:04 471417367

您好,LayoutLM 系列模型我们还没有支持转 ONNX。

您好,有预计支持的计划吗

shelleyyyyu avatar Nov 09 '22 02:11 shelleyyyyu

This issue is stale because it has been open for 60 days with no activity. 当前issue 60天内无活动,被标记为stale。

github-actions[bot] avatar Jan 08 '23 15:01 github-actions[bot]

This issue was closed because it has been inactive for 14 days since being marked as stale. 当前issue 被标记为stale已有14天,即将关闭。

github-actions[bot] avatar Jan 23 '23 00:01 github-actions[bot]