田妞的读书笔记

关注

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

田妞的读书笔记

关注

阅读 61

2022-12-04


报错如下:

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()


相关推荐

左小米z

Input type (torch.FloatTensor) and weight type (torch.cuda.FloatTensor) should be the same(解决)

左小米z 44 0 0

思考的鸿毛

RuntimeError: Expected object of device type cuda but got device type cpu for argument ……

思考的鸿毛 83 0 0

年夜雪

RuntimeError: Attempting to deserialize object on a CUDA device but torch.cuda.is_available() is Fal

年夜雪 373 0 0

西风白羽

docker torch cuda

西风白羽 46 0 0

穿裙子的程序员

<input type=

穿裙子的程序员 167 0 0

八怪不姓丑

【pytorch错误】:Pytorch RuntimeError: “host_softmax” not implemented for 'torch.cuda.LongTensor'

八怪不姓丑 71 0 0

科牛

RuntimeError: Bool type is not supported by dlpack

科牛 103 0 0

七千22

CUDA torch reinstall 与杂谈

七千22 41 0 0

和谐幸福的人生

input之type属性

和谐幸福的人生 151 0 0

龙毓七七

Specify the input method type

龙毓七七 81 0 0

精彩评论(0)

0 0 举报