rasbt:

Can you try it without that line (`os.environ[“CUDA_VISIBLE_DEVICES”] = “1”) and see if it works normally then? I have actually never used that except when I was using TensorFlow and I am not sure if this plays well with PyTorch.


If I don’t choose GPU, everything works fine. The thing is I had to share GPUs with others so I had to choose GPUs to run.



 rasbt:

b = torch.tensor(arr, dtype=torch.int64, device=‘cuda:1’)


this makes the code keep running without stopping and doesn’t show anything.  But device=‘cuda:0’ works normally.