pengaoao
pengaoao
Thank you very much!
> 具体看一下这个文档,https://github.com/PaddlePaddle/PaddleNLP/tree/develop/model_zoo/ernie-3.0/deploy/paddle2onnx https://bj.bcebos.com/paddlenlp/models/transformers/ernie_3.0/ernie_3.0_base_zh.pdparams 看了,这里下载了pdparams,但是缺少.pdmodel,哪里下载呢, paddle2onnx需要.pdmodel才能导出onnx
> 目前动态图转成onnx的模型流程是 动态图模型->静态图模型(.pdmodel) -> onnx模型,不过ernie-3.0模型是一个预训练模型,需要下游任务微调后的模型才具备使用价值。下面是具体的转成静态图模型的代码 > > ```python > import os > import paddle > from paddlenlp.transformers import AutoModel > > model = AutoModel.from_pretrained('ernie-3.0-base-zh') > > model.eval() > > model...
> 在上面的回复有提过,ernie-3.0的模型是一个预训练模型,需要经过场景数据来微调才能体现出效果,如果直接拿预训练模型直接来分类是不可以的 ,如果需要自己的场景进行分类,可以参考 https://github.com/PaddlePaddle/PaddleNLP/tree/develop/applications/text_classification 但是我是在clue数据集上运行的,就是将BASE导出onnx, 然后用你们提供的脚本评测了一下,1是出现上面那个错误,需要修改237,238行,2是修改之后acc是0.473
我这边也碰到同样的问题了。
> I am exporting the same model, the onnx cer is 11.7%, while the torch infer cer is 4.7%
> > > > I am exporting the same model, the onnx cer is 11.7%, while the torch infer cer is 4.7% @Masao-Someki Could you plz look at this model?
> @yuekaizhang @pengaoao I'm sorry for the late replay, I fixed the beam_search-related bug. Would you check the accuracy with the latest espnet_onnx? Note that `ctc_weight=0.3` in the model, so...
> accuracy I change the torch version to 1.12, the error disappear, I m testing the acc
> I test on 3000 files with ctc_weight=0.3, the cer is 14%, the problem seems not be solved