-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
predictor.run()报错 #8997
Comments
您好,我们已经收到了您的问题,会安排技术人员尽快解答您的问题,请耐心等待。请您再次检查是否提供了清晰的问题描述、复现代码、环境&版本、报错信息等。同时,您也可以通过查看官网文档、常见问题、历史Issue来寻求解答。祝您生活愉快~ Hi! We've received your issue and please be patient to get responded. We will arrange technicians to answer your questions as soon as possible. Please make sure that you have posted enough message to demo your request. You may also check out the API,FAQ and Github Issue to get the answer.Have a nice day! |
搞不明白那里出错了,请大佬们指教! |
那个[QT]错误好像不影响运行,主要是最下边那个 |
请问原始模型在哪呢?另外,这个模型的输入数据类型好像是int64 int32,需要设置正确的数据类型。boolean setData(float[] data); 这个接口用的是float 类型 |
Java API:https://paddle-lite.readthedocs.io/zh/develop/api_reference/java_api_doc.html#setdata |
看明白我的数据类型存在问题了,但是data_ptr = tensor.mutable_data<int32_t>();这个操作不会弄,是在setData(float[])之后操作吗?有没有比较完整的demo可以参考呢? |
你在tensor.java 文件中添加int64 setData 接口支持就行 |
参考这个文件:https://github.com/PaddlePaddle/Paddle-Lite/blob/develop/lite/api/android/jni/src/com/baidu/paddle/lite/Tensor.java#L117 |
Java API 接口没有开放此类型支持,已提PR 修复:#8999 |
我在Ai studio平台上使用int32类型的数据也可以得到输出(输出是int64)的。我必须要把输入也改成int64或者把输出改成int32吗? |
这样我得重新编译那个paddle lite源码吧? |
|
这个根据模型进行选择,如果模型输入是int32, 输出是int64。那输入数据类型设置int32,输出设置int64 就行 |
这是不是说,我的报错不是因为数据类型的问题,因为int32是已经支持的。 |
嗯,这个paddle 模型地址,能提供下吗?我们本地也看看 |
项目地址:这里 基本是按照你们官方项目写的 『NLP经典项目集』05:新年到,飞桨带你对对联 建议fork一下我的项目,然后重新生成一下.nb文件。(精度不用管,能跑通就行)(目前我猜测可能是模型的输入有俩,如果只有一个可能就可以了;还有就是beam search束宽要设置为1) |
不用整个复杂的项目,你提供训练后保存的paddle 原始模型就行。 |
链接:https://pan.baidu.com/s/1V71UQdmi3umpl5I1-bT42A |
x=paddle.to_tensor([[0 , 566, 566, 489, 42 , 165, 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , |
这个转换是.model转成.nb吗?我没遇到这个问题 |
问题已修复,rnn OP 中部分中间态没有初始化引起,已提PR 修复:#9005 |
那个是转换错误,kernel pick 时,没有设定input tensor 数据类型,使用了默认的float ,导致多插入了caliber 算子 |
好的,谢谢,强! 另外问一下,我是不是得等paddlelite版本更新后,才能用上新的(修复问题)的opt工具啊 |
嗯嗯,是的 |
建立 issue 时,为快速解决问题,请您根据使用情况给出如下信息:
1)Paddle Lite 版本:v2.11-rc
2)Host 环境:Win10 ,手机是 红米note10pro
1)NLP——对联生成
2)https://aistudio.baidu.com/aistudio/projectdetail/3963474?contributionType=1&shared=1
我检查了一下,是predictor.run()运行失败运行失败。模型的输入有两个,我是这样写的代码:

The text was updated successfully, but these errors were encountered: