Registration is open for TensorFlow Dev Summit 2020 Learn more

tf.contrib.eager.num_gpus

View source on GitHub

Get the number of available GPU devices.

tf.contrib.eager.num_gpus()

Returns:

The number of available GPU devices.