Shawn Imm Shawn Imm - 4 days ago 5
Python Question

Creating log directory in tensorboard

I am trying to learn how to use tensorboard and I would like to have it run in my program. I do not understand how to create a log directory. These are the lines I have for running tensorboard.

summary_writer = tf.train.SummaryWriter('/tensorflow/logdir', sess.graph_def)
tensorboard --logdir=tensorflow/logdir


The error message that I got was

Cannot assign to operator

Answer

This line needs to be in your code (the python script), as it seems you put it:

summary_writer = tf.train.SummaryWriter('/tensorflow/logdir', sess.graph_def)

This line, however, you have to call from linux (and not from within the script):

tensorboard --logdir=tensorflow/logdir

However, there is a lot more you need to do, before tensorboard really runs: How to create a Tensorflow Tensorboard Empty Graph

Comments