问题描述:RuntimeError: Tensor for 'out' is on CPU, Tensor for argument #1 'self' is on CPU, but expected them to be on GPU (while checking arguments for addmm)
问题详情:在基于PyTorch的模型训练中,model传到了GPU,但是数据没有传到GPU
解决方法:将所需数据传至GPU,比如 batch_data = batch_data.to("cuda")
(仅供参考)