tf.test.is_gpu_available(cuda_only=False)

tf.test.is_gpu_available(cuda_only=False)

See the guide: Testing > Utilities

Returns whether TensorFlow can access a GPU.

Args:

  • cuda_only: limit the search to CUDA gpus.

Returns:

True iff a gpu device of the requested kind is available.

Defined in tensorflow/python/platform/test.py.