首页 Paddle框架 帖子详情
半精度(fp16)训练模型优化器更新参数产生报错
收藏
快速回复
Paddle框架 问答模型训练深度学习 658 3
半精度(fp16)训练模型优化器更新参数产生报错
收藏
快速回复
Paddle框架 问答模型训练深度学习 658 3

报错信息如下:

(InvalidArgument) The type of data we are trying to retrieve does not match the type of data currently contained in the container.
[Hint: Expected dtype() == paddle::experimental::CppTypeToDataType::Type(), but received dtype():10 != paddle::experimental::CppTypeToDataType::Type():12.] (at /paddle/paddle/phi/core/dense_tensor.cc:137)
[operator < adam > error]

在optimizer.step()处出现报错

已打断点确认过loss, model, 和optimizer本身的数据类型均为float16,但还是会莫名其妙报这个数据类型不匹配错误

0
收藏
回复
全部评论(3)
时间顺序
李长安
#2 回复于2022-07

你要不看看我的项目?

0
回复
Sige
#3 回复于2022-07
你要不看看我的项目?

嗯?给个Github链接?

0
回复
李长安
#4 回复于2022-07
Sige #3
嗯?给个Github链接?

https://aistudio.baidu.com/aistudio/projectdetail/1338814?contributionType=1&shared=1

0
回复
需求/bug反馈?一键提issue告诉我们
发现bug?如果您知道修复办法,欢迎提pr直接参与建设飞桨~
在@后输入用户全名并按空格结束,可艾特全站任一用户