It seemed that PyTorch failed to find my GPU. How can I fix this? Many thanks!
Python 3.8.3 (default, Jul 2 2020, 16:21:59)
[GCC 7.3.0] :: Anaconda, Inc. on linux
Type “help”, “copyright”, “credits” or “license” for more information.
import torch
torch.randn(5)
tensor([ 0.9021, 0.6406, 0.1212, 0.3215, -0.4576])
torch.randn(5).to(0)
Traceback (most recent call last):
File “”, line 1, in
RuntimeError: CUDA error: all CUDA-capable devices are busy or unavailable