PyTorch在CentOS中的兼容性问题及解决方法如下:
--index-url
gcc
openssl-devel
cudatoolkit
import torch
torch.cuda.is_available()
参考来源: