判断CUDA是否可用:
tf.test.is_built_with_cuda()
参考: tf.test.is_built_with_cuda | TensorFlow
判断GPU是否可用:
tf.test.is_gpu_available(
cuda_only=False,
min_cuda_compute_capability=None
)
参考: tf.test.is_gpu_available | TensorFlow
tf.test.is_built_with_cuda()
参考: tf.test.is_built_with_cuda | TensorFlow
tf.test.is_gpu_available(
cuda_only=False,
min_cuda_compute_capability=None
)
参考: tf.test.is_gpu_available | TensorFlow
转载于:https://my.oschina.net/luochuan01/blog/1814092