Hossein
Hossein

Reputation: 2111

Why tensorboard does not show the graph?

This is a simple code which creates a single node in the computational graph using tensorflow:

import tensorflow as tf
tf.constant(5)
writer = tf.summary.FileWriter('./path', tf.Session().graph)
writer.close()

When I try to visualize this graph using tensorboard, no graph is shown. This is my terminal code:

tensorboard --logdir=[![enter image description here][1]][1]path --port 6006

What is wrong with my codes?

Upvotes: 0

Views: 1115

Answers (1)

Salvador Dali
Salvador Dali

Reputation: 222531

There is no computational graph in your code. There is just alone vertex that does nothing. Create a graph with at least one op:

import tensorflow as tf
a = tf.constant(5)
b = tf.constant(5)
c = a + b

with tf.Session() as sess:
    writer = tf.summary.FileWriter('path', sess.graph)
    writer.close()

and you will see it

Upvotes: 1

Related Questions