Watch talks from the 2019 TensorFlow Dev Summit Watch now

tf.contrib.eager.num_gpus

tf.contrib.eager.num_gpus()

Defined in tensorflow/python/eager/context.py.

Get the number of available GPU devices.

Returns:

The number of available GPU devices.