pretrained-models.pytorch icon indicating copy to clipboard operation
pretrained-models.pytorch copied to clipboard

RuntimeError: Expected tensor for argument #1 'input' to have the same device as tensor for argument #2 'weight'; but device 1 does not equal 0 (while checking arguments for cudnn_convolution)

Open HongguLiu opened this issue 4 years ago • 2 comments

Hello, When I used multiple gpus to train model, I usually get this error. RuntimeError: Expected tensor for argument #1 'input' to have the same device as tensor for argument #2 'weight'; but device 1 does not equal 0 (while checking arguments for cudnn_convolution) Could you tell me how to sole it.

best, Honggu Liu

HongguLiu avatar Jun 12 '20 01:06 HongguLiu

Same issure. Did you fix it?

AAA-Fan avatar Jun 23 '20 03:06 AAA-Fan

Specify a gpu device using 'CUDA_VISIBLE_DEVICES=0'

surprisedong avatar Feb 18 '21 04:02 surprisedong