1、pytorch的安装和版本问题
https://pytorch.org/get-started/previous-versions/ (版本问题)
https://pytorch.org/tutorials/ (案例学习)
验证cuda是否可用以及版本号,发现和本地的版本不一致,会导致不可用,重新下拉镜像
import torch
print(torch.__version__)
print(torch.version.cuda)
print(torch.backends.cudnn.version())
torch.cuda.is_available()
#cuda是否可用;torch.cuda.device_count()
#返回gpu数量;torch.cuda.get_device_name(0)
#返回gpu名字,设备索引默认从0开始;torch.cuda.current_device()
2、TensorFlow的版本和安装学习问题
https://www.tensorflow.org/install/source?hl=zh-cn
3、代码判断是否有可用的cuda和gpu
import tensorflow as tf
tf.test.is_gpu_available()