During Pytorchx training, gpu multithreading cannot be used to load pictures

Multi-threaded image loading uses cpu instead of gpu, you need to re-download the pytorch gpu version:

1. conda list command

(The torch display version in the figure above is: 1.6.0+cu101, if you display 1.6.0, it means that you installed the cpu version)

2. Link https://pytorch.org/get-started/previous-versions/ to search for the corresponding version loading,

pip install torch==1.9.0+cu102 torchvision==0.10.0+cu102 torchaudio==0.9.0 -f https://download.pytorch.org/whl/torch_stable.html

 

Guess you like

Origin blog.csdn.net/weixin_45866058/article/details/124345087