Paddle output_tensor.copy_to_cpu() ValueError: (InvalidArgument) The Variable type must be N6paddle9framework9LoDTensorE, but the type it holds is St6vectorIN6paddle9framework9LoDTensorESaIS2_EE.

ocebsuys  于 2022-10-20  发布在  其他
关注(0)|答案(4)|浏览(286)

Paddle版本2.2.1
利用静态图模型进行推理的时候,在output_tensor.copy_to_cpu()时出现了错误:
ValueError: (InvalidArgument) The Variable type must be N6paddle9framework9LoDTensorE, but the type it holds is St6vectorIN6paddle9framework9LoDTensorESaIS2_EE.
[Hint: Expected holder_->Type() == VarTypeTrait::kId, but received holder_->Type():13 != VarTypeTrait::kId:7.] (at /paddle/paddle/fluid/framework/variable.h:54)

请问有什么解决思路吗?

谢谢~

ymzxtsji

ymzxtsji1#

您好,我们已经收到了您的问题,会安排技术人员尽快解答您的问题,请耐心等待。请您再次检查是否提供了清晰的问题描述、复现代码、环境&版本、报错信息等。同时,您也可以通过查看 官网API文档常见问题历史IssueAI社区 来寻求解答。祝您生活愉快~

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 APIFAQGithub Issue and AI community to get the answer.Have a nice day!

cl25kdpy

cl25kdpy2#

请问是使用的paddle inference吗?

cunj1qz1

cunj1qz13#

请问是使用的paddle inference吗?

是的。之前是可以的,后来不行了。我不清楚我的什么改动引起了这个错误。

bvjxkvbb

bvjxkvbb4#

请问是使用的paddle inference吗?

是的。之前是可以的,后来不行了。我不清楚我的什么改动引起了这个错误。

请求接口的参数错误

相关问题