Search code examples
tensorflowjupyter-notebooktensorboard

tensorflow error utf-8 OS X Sierra


I've installed TensorFlow with Anaconda on OS X Sierra. I didn't´t have any problems during installation. Writing the tipical example:

import tensorflow as tf
a = tf.constant(5, name="input_a")
b = tf.constant(3, name="input_b")
c = tf.mul(a, b, name="mul_c")
d = tf.add(a, b, name="add_d")
e = tf.add(c, d, name="add_e")

sess = tf.Session()
output = sess.run(e)
writer = tf.summary.FileWriter('./my_graph', sess.graph)

writer.close()
sess.close()

The file is created in the appropriate folder, but when I try to pen it with TensorBoard there are not graph. When I tryed to open the file with Jupyter-Notebook I receive the following text.

Error! /Users/Pancho/tf-notebooks/my_graph/events.out.tfevents.xxxxxxxxx.MacBook-Pro-xxx.local is not UTF-8 encoded

Saving disabled.

See console for more details.

No additional info on console.


Solution

  • I´ve found the problem. I wasn´t able to open the file using tensorboard because I wasn´t using the full path to the directory. The UTF-8 error was produced when I tried to open the file with Jupyter notebook.