Cuda Info:
Run nvidia-smi:
Problem: It turned out that using conda will install a CPU-only version by running the conda command provided by https://pytorch.org/get-started/locally/
Solution: Use the pip command to install the torch. In my case it should be
pip3 install torch==1.10.0+cu113 torchvision==0.11.1+cu113 torchaudio===0.10.0+cu113 -f https://download.pytorch.org/whl/cu113/torch_stable.html
After the installation, check whether the gpu-based torch has been installed:
Reference: 解决torch.cuda.is_available()一直返回False的玄学方法之一_dysljxjsq的博客-CSDN博客