可以
device = torch.device('cuda:1') #不用0了
model = model.to(device)
x=x.to(device)
或者在.bashrc , .profile中
export CUDA_VISIBLE_DEVICES=1,2,3,4
把坏的那一张如0,不写
参考
可以
device = torch.device('cuda:1') #不用0了
model = model.to(device)
x=x.to(device)
或者在.bashrc , .profile中
export CUDA_VISIBLE_DEVICES=1,2,3,4
把坏的那一张如0,不写
参考