RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:1

问题:在这里插入图片描述
错误:出现x0和self.weight_v放在不同的GPU上。
解决方法:把self.weight_v放在x0的GPU上

RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:1_第1张图片

你可能感兴趣的:(pytorch,pytorch,深度学习,人工智能,神经网络)