本文介绍了如何启动 Tensorboard?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在关注 https://www.tensorflow.org/guide/上的 Tensorflow 介绍指南low_level_intro,并设法使用

I am following the introductory guide on Tensorflow at https://www.tensorflow.org/guide/low_level_intro, and managed to create an 'events.out' file by using

writer = tf.summary.FileWriter('.')
writer.add_graph(tf.get_default_graph())
writer.flush()

在我的python文件中并运行它.下一步是在终端"中使用shell 命令"tensorboard --logdir 启动 Tensorboard.这该怎么做?我应该使用什么终端?我试过 windows powershell,但它似乎不起作用.它给出了错误

in my python file and running it. The next step is to launch Tensorboard in a 'terminal' with the 'shell command' tensorboard --logdir. How to do this? What terminal am I supposed to use? I tried windows powershell but it does not seem to work. It gives the error

tensorboard : 术语tensorboard"不被识别为cmdlet、函数、脚本文件或可运行的程序.检查名称的拼写,或者如果包含路径,请验证路径是正确的,然后再试一次.在行:1 字符:1+ 张量板 --logdir+ ~~~~~~~~~~~+ CategoryInfo : ObjectNotFound: (tensorboard:String) [], CommandNotFoundException+ FullQualifiedErrorId : CommandNotFoundException

推荐答案

使用 PowerShell 很好.听起来您的 PATH 没有像其他人所说的那样配置为查找 Tensorboard 二进制文件.你能告诉我你从 pip show tensorflow 中得到了什么吗?它应该有如下内容:

Using PowerShell is fine. It sounds like your PATH is not configured to find the Tensorboard binary like others are saying. Can you show me what you get for pip show tensorflow? It should have something like below:

(1) ➜  ~ pip show tensorflow
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
Name: tensorflow
Version: 1.12.0
Summary: TensorFlow is an open source machine learning framework for everyone.
Home-page: https://www.tensorflow.org/
Author: Google Inc.
Author-email: [email protected]
License: Apache 2.0
Location: c:\users\stephanwlee\venv\tf\lib\site-packages
Requires: enum34, keras-preprocessing, wheel, astor, backports.weakref, mock, tensorboard, termcolor, protobuf, gast, absl-py, grpcio, six, keras-applications, numpy
Required-by:

在上面的输出中,位置是一个重要的部分,它告诉你二进制文件的粗略放置位置.如果你像 TensorFlow 安装指南一样使用 virtualenv(一切都应该无缝设置,我建议你使用它),二进制文件应该在 c:\users\stephanwlee\venv\tf\Scripts.请检查路径是否在 $env:path 中.

In above output, location is the important piece that tells you where binaries are roughly gets placed. If you are using virtualenv like the TensorFlow installation guide (everything should be set up seamlessly and I would recommend you to use it), the binaries should be in c:\users\stephanwlee\venv\tf\Scripts. Please check and see if the path is in $env:path.

如果这些都没有帮助,请在响应中添加来自 PowerShell 的 pip show tensorflow$env:path 的结果,谢谢!

If any of these didn't help, please do add result of pip show tensorflow and $env:path from PowerShell in the response, thanks!

这篇关于如何启动 Tensorboard?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-05 10:59