多线程图片加载是使用 cpu,非gpu时,需重新下载pytorch gpu版:
1.conda list命令
(上图torch显示版本是:1.6.0+cu101,如果你显示的是1.6.0,表示你安装的是cpu版本)
2.链接https://pytorch.org/get-started/previous-versions/去搜寻对应版本装载,
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