I was playing around with tensorflow apis on google colab virtual notebook. I want to see device mapping of my colab virtual machine.
As mentioned on tensorflow developer guide, I can set the flag (log_device_placement=True) to enable logging. https://www.tensorflow.org/guide/using_gpu
Below is my code running on colab notebook -
import tensorflow as tf
# Creates a graph.
a = tf.constant([1.0, 2.0, 3.0, 4.0, 5.0, 6.0], shape=[2, 3], name='a')
b = tf.constant([1.0, 2.0, 3.0, 4.0, 5.0, 6.0], shape=[3, 2], name='b')
c = tf.matmul(a, b)
tf.logging.set_verbosity(tf.logging.INFO)
# Creates a session with log_device_placement set to True.
sess = tf.Session(config=tf.ConfigProto(log_device_placement=True))
# Runs the op.
print(sess.run(c))
But it doesn't seems to work on colab notebook. However it is working with local jupyter notebook terminal console.
Any idea how to enable logging on google colab platform ?