- tensorflow
import tensorflow as tf
print(tf.test.is_gpu_available())
- pytorch
import torch
print(torch.cuda.is_available())
import tensorflow as tf
print(tf.test.is_gpu_available())
import torch
print(torch.cuda.is_available())