tensorflow error utf-8 OS X Sierra

╄→гoц情女王★ 提交于 2021-01-27 20:35:24

问题


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.


回答1:


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.



来源:https://stackoverflow.com/questions/41912622/tensorflow-error-utf-8-os-x-sierra

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!