根据git 上的回复,应该是模型和variable 没有load 到gpu 上,下面可解决。
Most likely that the net is not on GPU, try adding the following, just after weight loading:
if torch.cuda.is_available():
net = net.cuda()
根据git 上的回复,应该是模型和variable 没有load 到gpu 上,下面可解决。
Most likely that the net is not on GPU, try adding the following, just after weight loading:
if torch.cuda.is_available():
net = net.cuda()