0

please help! I am new in using tensorboard, and been trying to use to vizualize the metrics of my model but I get some werid error So I used a simple code of tensorboard from here : https://www.easy-tensorflow.com/tf-tutorials/basics/introduction-to-tensorboard , but still getting the same error, which is when I run the command line tensorboard --logdir="./graphs" to vizualize the board, I get the local @ but it contains nothing. As when I go and check the content of the created log file, this is all i find : enter image description here import tensorflow as tf tf.reset_default_graph() # To clear the defined variables and operations of the previous cell

# create graph
a = tf.constant(2)
b = tf.constant(3)
c = tf.add(a, b)

# creating the writer out of the session
# writer = tf.summary.FileWriter('./graphs', tf.get_default_graph())

# launch the graph in a session
with tf.Session() as sess:
    # or creating the writer inside the session
    writer = tf.summary.FileWriter('./graphs', sess.graph)
    print(sess.run(c))
kil007
  • 11
  • 4

1 Answers1

0

I just guess...

.# creating the writer out of the session

.# writer = tf.summary.FileWriter('./graphs', tf.get_default_graph()) >> Is it necessary to create it?

高鵬翔
  • 1,997
  • 2
  • 8
  • 21
  • those are two different ways to declare tf.summary.FileWriter , you can use it out of a session or inside and both work – kil007 Mar 25 '20 at 07:14
  • @kil007 Hi, I found this. Is it similar? https://stackoverflow.com/questions/41912622/tensorflow-error-utf-8-os-x-sierra – 高鵬翔 Mar 25 '20 at 07:46
  • and here https://stackoverflow.com/questions/35928426/error-c-file-example-db-is-not-utf-8-encoded-ipython-notebook – 高鵬翔 Mar 25 '20 at 07:49