-
Notifications
You must be signed in to change notification settings - Fork 408
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Got OrtException when deploy ONNX model to Android #52
Comments
您好,我们对于onnx在Android的部署也不是很熟悉 😢 初步怀疑是onnxruntime的版本问题,请问可以对齐下我们文档中的版本号,重新试试看吗? |
您好, 谢谢回复哈。 这是我的环境,是和文档中的对齐,但是还是报同样的错误的。不知方便的话,能否通过网盘分享下你们那边生成的ONNX模型的。谢谢哈 Package Version certifi 2022.12.7 |
麻烦尝试下转换onnx成功后,测试一下你转成的模型onnx_runtime能不能运行成功(参考cn_clip/deploy/speed_benmark.py)。区分下现在的问题是转换onnx的问题还是把onnx部署到android的问题。 |
你好, PC是可以运行ONNX模型的。但是我部署在Android上报错是这样的: 问下,这个Node:/visual/Unsqueeze是模型里面的一个节点吧? |
我在模型转换的过程中,看到这样的Log: |
你好,请问你现在成功部署了吗 |
PC可以运行,但是Android上无法运行 |
|
Android端,txt模型碰到如下错误: Error in Node:/bert/Unsqueeze : Node (/bert/Unsqueeze) has input size 2 not in range [min=1, max=1]. |
是Android端的环境的问题,我将ONNX 运行时环境更改如下就好了: implementation group: 'com.microsoft.onnxruntime', name: 'onnxruntime-android', version: '1.13.1' |
请问一下,在android上使用onnx model,一张图片处理下来的latency平均是多少ms? |
Hello your team,
I followed the guide here: https://github.com/OFA-Sys/Chinese-CLIP/blob/master/deployment.md and success get the ONNX model that list below:
vit-b-16.txt.fp32.onnx 391 MB
vit-b-16.txt.fp16.onnx 2.27 MB
vit-b-16.img.fp32.onnx 332 MB
vit-b-16.img.fp16.onnx 3.34 MB
vit-b-16.txt.fp16.onnx.extra_file 194 MB
vit-b-16.img.fp16.onnx.extra_file 164 MB
But when I deployed the img model("vit-b-16.img.fp32.onnx") to Android, I just met the follow exception:
ai.onnxruntime.OrtException: Error code - ORT_INVALID_GRAPH - message: This is an invalid model. Error in Node:/visual/Unsqueeze : Node (/visual/Unsqueeze) has input size 2 not in range [min=1, max=1]. at ai.onnxruntime.OrtSession.createSession(Native Method) at ai.onnxruntime.OrtSession.<init>(OrtSession.java:82) at ai.onnxruntime.OrtEnvironment.createSession(OrtEnvironment.java:206) at ai.onnxruntime.OrtEnvironment.createSession(OrtEnvironment.java:179)
I just a newbee here, can you team give some suggestions to overcome this bug?
Thanks so much.
The text was updated successfully, but these errors were encountered: