Paddle2ONNX icon indicating copy to clipboard operation
Paddle2ONNX copied to clipboard

NLP模型都不能转ONNX吗

Open bigvine2 opened this issue 4 years ago • 7 comments

看了一下支持列表,里面没有一个nlp模型,是NLP模型都不支持吗?如果支持如何将LAC模型转成ONNX,我看文档发现LAC模型与转ONNX需要的模型文件差别很大,好想LAC模型是旧版的paddle模型,是这样吗?如果是旧版的paddle模型,是不是无法转ONNX,还是说低版本的paddle2ONNX可以转?

bigvine2 avatar Jun 21 '21 06:06 bigvine2

当前测试的模型以CV模型居多,NLP模型并没有不支持,如Ernie, Bert等都是支持的

jiangjiajun avatar Jun 21 '21 07:06 jiangjiajun

我看到NLP支持的模型了,列表里面有两个分别是ERNIE1.0和2.0,这两个模型都很大,我现在只希望做一个简单的命名实体识别,测试了一下LAC效果还可以,模型挺小,这个能转换成ONNX吗?

bigvine2 avatar Jun 21 '21 09:06 bigvine2

LAC目前没有测试过,你可以先试下是否可以导出

jiangjiajun avatar Jun 21 '21 11:06 jiangjiajun

试过了,LAC模型不能转onnx,里面有两个ops不支持

NotImplementedError: There's 2 ops are not supported yet =========== crf_decoding =========== =========== gru ===========

bigvine2 avatar Jun 22 '21 07:06 bigvine2

能否发一个Ernie, Bert可以转onnx的预训练模型下载地址?github上下载的模型里面没有 model,无法转onnx

bigvine2 avatar Jun 22 '21 07:06 bigvine2

ploat-2 可以转 onnx 么,github上下载的模型里面也没有 model

ifromeast avatar Jun 23 '21 05:06 ifromeast

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] avatar Jun 16 '25 03:06 github-actions[bot]

This issue was closed because it has been inactive for 14 days since being marked as stale.

github-actions[bot] avatar Jun 30 '25 03:06 github-actions[bot]