# 查看Keras 是否可使用gpu
from keras import backend as K gpu =K.tensorflow_backend._get_available_gpus() print(gpu)
# 查看tensorflow是否可使用gpu import tensorflow as tf print(tf.test.is_gpu_available())
# 查看Keras 是否可使用gpu
from keras import backend as K gpu =K.tensorflow_backend._get_available_gpus() print(gpu)
# 查看tensorflow是否可使用gpu import tensorflow as tf print(tf.test.is_gpu_available())