import tensorflow as tf
print(tf.test.is_gpu_available())
print(tf.config.list_physical_devices('GPU'))
2、pytorch
import torch print(torch.cuda.is_available()) print(torch.Tensor(5, 3).cuda())3、paddlepaddle
import paddle paddle.fluid.install_check.run_check() paddle.fluid.is_compiled_with_cuda()



