layer.to(dtype)不识别paddle.float16及paddle.float64

ih99xse1  于 2022-11-13  发布在  其他
关注(0)|答案(2)|浏览(187)
  • 标题:layer.to(dtype)不识别paddle.float16及paddle.float64
  • 版本、环境信息:AI Studio paddlepaddle==2.2.0
    复现方法:
import paddle
import numpy as np

m = paddle.nn.Linear(10, 20)

m.to(dtype=paddle.float16) # 报错 TypeError: Cannot interpret 'paddle.float16' as a data type
m.to(dtype=np.float16) # 运行通过

m.to(dtype=paddle.float64) # 报错 TypeError: Cannot interpret 'paddle.float16' as a data type
m.to(dtype=np.float64) # 运行通过
dbf7pr2w

dbf7pr2w1#

您好,我们已经收到了您的问题,会安排技术人员尽快解答您的问题,请耐心等待。请您再次检查是否提供了清晰的问题描述、复现代码、环境&版本、报错信息等。同时,您也可以通过查看 官网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!

mccptt67

mccptt672#

@IcarusWizard 您好,这个是API识别参数有些bug,后续会进行修复,感谢提出

相关问题