tf get devices

Solutions on MaxInterview for tf get devices by the best coders in the world

showing results for - "tf get devices"
Luca
20 Nov 2019
1from tensorflow.python.client import device_lib
2
3def get_available_gpus():
4    local_device_protos = device_lib.list_local_devices()
5    return [x.name for x in local_device_protos if x.device_type == 'GPU']
queries leading to this page
tf get devicestf get devices