tensorflow错误utf-8 OS X Sierra [英] tensorflow error utf-8 OS X Sierra

查看:124
本文介绍了tensorflow错误utf-8 OS X Sierra的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在OS X Sierra上安装了带有Anaconda的TensorFlow.安装过程中我没有任何问题. 编写典型示例:

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()

该文件在适当的文件夹中创建,但是当我尝试使用TensorBoard进行书写时,没有图形. 当我尝试使用Jupyter-Notebook打开文件时,收到以下文本.

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.

错误! /Users/Pancho/tf-notebooks/my_graph/events.out.tfevents.xxxxxxxxx.MacBook-Pro-xxx.local不是UTF-8编码

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

已禁用保存.

有关更多详细信息,请参见控制台.

See console for more details.

控制台上没有其他信息.

No additional info on console.

推荐答案

我发现了问题. 我无法使用张量板打开文件,因为我没有使用目录的完整路径. 当我尝试使用Jupyter笔记本打开文件时,产生了UTF-8错误.

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.

这篇关于tensorflow错误utf-8 OS X Sierra的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆