0
点赞
收藏
分享

微信扫一扫

RuntimeError: expected scalar type Double but found Float

青乌 2022-12-09 阅读 72


网络传入的类型错误,我一开始是expected scalar type Floatbut found long

train_tensor = train_tensor.to(torch.float32)

然后就报

RuntimeError: expected scalar type Double but found Float

然后直接网络哪里修改

RuntimeError: expected scalar type Double but found Float_scala


然后就好了开始训练

RuntimeError: expected scalar type Double but found Float_scala_02


举报

相关推荐

float 与 double 类型区别

0 条评论