检查一下 pytorch 版本 , 如有帮助给个采纳谢谢命令:
python -c "import torch; print(torch.__version__)"
参考下这篇文章,希望可以解决你的问题: