I copied the code from denoising.ipynb into denoising.py just to ensure that jupyter wasn't the issue and than ran python denoising.py - it seemed very slow, so I checked nvidia-smi and noticed that the GPU wasn't being used.
I then tried:
$python -c 'import torch; print(torch.rand(2,3).cuda())'
$nvidia-smi (in another window)
and noticed that the GPU was being used in that case.
I noticed the line:
os.environ['CUDA_VISIBLE_DEVICES'] = '1'
and uncommented it, but it made no difference.
It looks like the code is setup to run on GPU (dtype = torch.cuda.FloatTensor), but it doesn't seem to be running on the GPU.
I copied the code from denoising.ipynb into denoising.py just to ensure that jupyter wasn't the issue and than ran python denoising.py - it seemed very slow, so I checked nvidia-smi and noticed that the GPU wasn't being used.
I then tried:
and noticed that the GPU was being used in that case.
I noticed the line:
os.environ['CUDA_VISIBLE_DEVICES'] = '1'
and uncommented it, but it made no difference. It looks like the code is setup to run on GPU (dtype = torch.cuda.FloatTensor), but it doesn't seem to be running on the GPU.