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