by

Check Available Devices in TensorFlow

To find available devices in TensorFlow, from Python prompt use –

import tensorflow as tf
from tensorflow.python.client import device_lib
print(device_lib.list_local_devices())

If you want to find out which device is being used, try –

import tensorflow as tf
sess = tf.Session(config=tf.ConfigProto(log_device_placement=True))

Source: Stackoverflow

Write a Comment

Comment