Python 无法打开 tensorboard 0.0.0.0:6006 或 localhost:6006

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/44175037/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-19 23:47:33  来源:igfitidea点击:

can't open tensorboard 0.0.0.0:6006 or localhost:6006

pythontensorflowtensorboard

提问by R.Wall

when i use tensorboard in cmd with win10

当我在 cmd 中使用 tensorboard 和 win10 时

D:\python document\tensorflow>tensorboard --logdir=D:\python document\tensorflow Starting TensorBoard b'47' at http://0.0.0.0:6006

D:\python document\tensorflow>tensorboard --logdir=D:\python document\tensorflow 在http://0.0.0.0:6006启动 TensorBoard b'47'

But when i open the webpage,it shows

但是当我打开网页时,它显示

"dial tcp 0.0.0.0:6006: connectex: The requested address is not valid in its context."

“拨号 tcp 0.0.0.0:6006:connectex:请求的地址在其上下文中无效。”

and i tried localhost:6006 then,and it shows

然后我尝试了 localhost:6006,它显示

"No scalar data was found."

“没有找到标量数据。”

so what should i do now

那我现在该怎么办

回答by Johnson Lai

Refer to tensorflow issue#9701.

请参阅tensorflow 问题#9701

Run tensorboard --logdir=YOUR_LOG_DIR --host=127.0.0.1in command prompt, and type localhost:6006in chrome, this works for me (Win10, anaconda4.3.16, python3.5.3, tensorflow1.1.0).

tensorboard --logdir=YOUR_LOG_DIR --host=127.0.0.1在命令提示符下运行,然后输入localhost:6006chrome,这对我有用(Win10、anaconda4.3.16、python3.5.3、tensorflow1.1.0)。

回答by Colin Wang

@Johnson Lai's solution( tensorboard --logdir=YOUR_LOG_DIR --host=127.0.0.1) is works, just add --host=127.0.0.1at the command tail.

@ Johnson Lai的解决方案( tensorboard --logdir=YOUR_LOG_DIR --host=127.0.0.1) 是有效的,只需--host=127.0.0.1在命令尾部添加即可。

but you shoud replace log_dirwith your own log dir.

但你应该log_dir用你自己的log dir.

tips:in log dir, log file(folder) likes run-20180422085300.

提示:log dir,日志文件(文件夹)喜欢run-20180422085300



here is my test!

这是我的测试!

launch your cmd in anywhrer:

在 anywhrer 中启动您的 cmd:

run commond tensorboard --logdir [your log dir] --host=127.0.0.1

共同运行 tensorboard --logdir [your log dir] --host=127.0.0.1

or

或者

launch your cmd with log dir, or commond cd [your log dir]

使用 log dir 或 commond 启动您的 cmd cd [your log dir]

run commond tensorboard --logdir ./ --host=127.0.0.1

共同运行 tensorboard --logdir ./ --host=127.0.0.1

I prefer the second method!

我更喜欢第二种方法!