报错是这一句
d2l.train_ch3(net, train_iter, test_iter, loss, num_epochs, batch_size, None, None, optimizer)
报错如下:
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)
在源代码末尾加上.cuda()依旧报错,求解
报错是这一句 d2l.train_ch3(net, train_iter, test_iter, loss, num_epochs, batch_size, None, None, optimizer) 报错如下: 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) 在源代码末尾加上.cuda()依旧报错,求解![image](https://user-images.githubusercontent.com/67496688/106447182-24dca000-64bc-11eb-82e9-75fd5334541c.png)