In fact, it is a torch version problem, indicating that the current Pytorch version cannot use the graphics card
Uninstall the original pytorch version first
pip uninstall torch
pip uninstall torchvision
Then download torch 1.9.1 version and torchvision 0.10.1 version
conda install torch=1.9.1
conda install torchvision=0.10.1