1 2 3 4 5 6 7 8 9 10 11 12 13 14
| import tensorflow as tf
print(tf.__version__) print(tf.test.gpu_device_name()) print(tf.config.experimental.set_visible_devices) print('GPU:', tf.config.list_physical_devices('GPU')) print('CPU:', tf.config.list_physical_devices(device_type='CPU')) print(tf.config.list_physical_devices('GPU')) print(tf.test.is_gpu_available())
print("Num GPUs Available: ", len(tf.config.experimental.list_physical_devices('GPU')))
tf.test.is_gpu_available()
|