0
点赞
收藏
分享

微信扫一扫

五、RuntimeError: Input type (torch.cuda.FloatTensor) and weight type (torch.FloatTensor)


报错如下:

RuntimeError: Input type (torch.cuda.FloatTensor) and weight type (torch.FloatTensor) should be the same

Input type (torch.cuda.FloatTensor) :代表输入在 GPU 上
weight type (torch.FloatTensor):代表模型在 CPU 上
需要将模型转到 GPU 上,即:model.cuda()


举报

相关推荐

0 条评论