PaddleNLP
PaddleNLP copied to clipboard
paddlenlp.transformers系列模型转ONNX报错
下的模型有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)
您好,LayoutLM 系列模型我们还没有支持转 ONNX。
谢谢
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: @.***>
您好,LayoutLM 系列模型我们还没有支持转 ONNX。
您好,有预计支持的计划吗
This issue is stale because it has been open for 60 days with no activity. 当前issue 60天内无活动,被标记为stale。
This issue was closed because it has been inactive for 14 days since being marked as stale. 当前issue 被标记为stale已有14天,即将关闭。