From 7c5ca9fdcafcec0e3781ed856eba42cd608f0e15 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Fri, 30 Jun 2017 20:17:24 +0200 Subject: es6 stuff --- python/devices.py | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 python/devices.py (limited to 'python') diff --git a/python/devices.py b/python/devices.py new file mode 100644 index 0000000..a24be23 --- /dev/null +++ b/python/devices.py @@ -0,0 +1,8 @@ +#!python + +from tensorflow.python.client import device_lib +import json + +device_ids = [device.name for device in device_lib.list_local_devices()] + +print json.dumps(device_ids) -- cgit v1.2.3-70-g09d2