AnniMa2
AnniMa2

Reputation: 35

Tensorboard name logdir is not defined

I was installing tensorboard using pip install tensorboard. All worked fine

I run my network and the writer also worked fine

with tf.Session() as sess:
    writer = tf.summary.FileWriter("pathtofolder", sess.graph)
    print(sess.run(h))
    writer.close()

now I wanted to see in tensorboard how it learned

I inserted

import tensorflow, tensorboard

tensorboard --logdir /pathtofolder

and received the error message. NameError: name 'logdir' is not defined

Upvotes: 1

Views: 2740

Answers (1)

Amir
Amir

Reputation: 16607

You should execute the command on terminal/cmd.

Open your terminal/cmd and run:

tensorboard --logdir ./PATH_TO_THE_EVENT_FILES

enter image description here

If you want to run Tensorboard on python file see here:

Upvotes: 1

Related Questions