tensorflow2.x gpu版本和pytorch安装

import tensorflow as tf
print(tf.__version__)
print(tf.test.is_gpu_available())
import torch
print(torch.__version__)
print(torch.cuda.is_available())#cuda是否可用
print(torch.cuda.device_count())
print(torch.cuda.get_device_name(0))

你可能感兴趣的:(tensorflow,pytorch,深度学习)