MCPcopy Create free account
hub / github.com/Palashio/libra / is_gpu_available

Method is_gpu_available

libra/preprocessing/data_reader.py:108–114  ·  view source on GitHub ↗

Returns a boolean value representing whether the current device has a GPU or not :return: Whether the current device has a GPU or not (bool)

(self)

Source from the content-addressed store, hash-verified

106 if device.device_type == 'GPU']
107
108 def is_gpu_available(self):
109 '''
110 Returns a boolean value representing whether the current device has a GPU or not
111
112 :return: Whether the current device has a GPU or not (bool)
113 '''
114 return tf.test.gpu_device_name() != ''

Callers 1

data_generatorMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected