我想使用Tensorboard可视化验证样本的损失演变.但是验证集太大而无法在一个小批量中进行计算.因此,为了计算我的验证损失,我必须在覆盖验证集的几个小批量上多次调用session.run.然后我总结每个小批量的损失(在python中)以获得完整的验证损失.
我的问题是tf.scalar_summary似乎必须附加到张量流节点.但我需要以某种方式将它"附加"到几个run.run运行的节点值的总和.
有没有办法做到这一点?也许通过直接总结包含小批量损失总和的python浮点数?但我没有在文档中看到一种方法来"总结"张量板,这是一个在计算之外的python值.文档的"操作方法"部分中的示例仅涉及可以在对session.run的单个调用中计算的损失.
我正在尝试使用TensorFlow生成摘要并使用TensorBoard可视化它们.但是,我收到一个InvalidArgumentError: You must feed a value for placeholder tensor 'Placeholder_1' with dtype float我不明白的错误().
这是我的计划的完整来源:
from tensorflow.examples.tutorials.mnist import input_data
mnist = input_data.read_data_sets("MNIST_data/", one_hot=True)
import tensorflow as tf
x = tf.placeholder(tf.float32, [None, 784])
W = tf.Variable(tf.zeros([784, 10]))
b = tf.Variable(tf.zeros([10]))
y = tf.nn.softmax(tf.matmul(x, W) + b)
_ = tf.histogram_summary("weights", W)
_ = tf.histogram_summary("biases", b)
_ = tf.histogram_summary("y", y)
y_ = tf.placeholder(tf.float32, [None, 10])
with tf.name_scope("xent") as scope:
cross_entropy = -tf.reduce_sum(y_*tf.log(y))
_ = tf.scalar_summary("cross entropy", cross_entropy)
with tf.name_scope("train") as scope:
train_step …Run Code Online (Sandbox Code Playgroud) 我正在使用tensorboard来显示三次运行.我有一个文件夹,logs其中包含三个文件:
2016-03-18_22-11-12
2016-03-18_22-11-27
2016-03-18_22-23-46
Run Code Online (Sandbox Code Playgroud)
当我tensorboard --logdir .(从日志)运行时,只有2016-03-18_22-23-46
可见:
如果我2016-03-18_22-23-46从日志中删除并重新启动tensorboard,那么只有2016-03-18_22-11-27可见.知道这里发生了什么吗?
编辑:日志文件(令我惊讶),相当大:这是结果du -h:
1,1G ./2016-03-18_22-23-46
925M ./2016-03-18_22-11-12
934M ./2016-03-18_22-11-27
2,9G .
Run Code Online (Sandbox Code Playgroud)
编辑: 上面的运行结构可以通过记录和检查点到tensorboard log-dir的子目录获得:
run_time = datetime.datetime.now().strftime("%Y-%m-%d_%H-%M-%S")
FLAGS.train_dir = '/datalab/tf_runs/' + run_time #Directory to put the training data.
summary_writer = tf.train.SummaryWriter(FLAGS.train_dir, sess.graph_def)
Run Code Online (Sandbox Code Playgroud) 我写了一个带张量流的CNN图像分类器,并使用tensorboard来监控训练.但是,当我从检查点停止并恢复时,会出现以下重叠:

我按照Tensorboard README上的说明将SessionStatus.START消息写入摘要文件,但它似乎不起作用.
这是我的代码:
summary_writer.add_session_log(SessionLog(status=SessionLog.START),global_step=step)
Run Code Online (Sandbox Code Playgroud) 在Tensorboard中有一个按钮将计算图保存为png,有没有办法将其导出为像eps这样的矢量图形?
我是Google Cloud(和unix)的新手,并且一直在ml-engine使用Tensorflow训练神经网络.
这里说它可以使用监控应用程序tensorboard.我该如何访问tensorboard面板?当我运行它(来自Cloud Shell Access控制台)时,它表示它正在http://0.0.0.0:6006运行
我不知道Cloud Shell控制台的IP,我如何访问tensorboard面板?
我运行的命令(和输出):
tensorboard --logdir=gs://model_output
Starting TensorBoard 47 at http://0.0.0.0:6006
Run Code Online (Sandbox Code Playgroud)
谢谢!
我正在尝试可视化我在远程服务器上培训的培训课程。我使用scp将文件复制到本地iMac中。我试图通过运行tensorboard来可视化数据。它运行tensorboard网站,但我无法获得可视化效果。每个图表在零处都有一个点。我在终端上收到此警告。
WARNING:tensorflow:Unable to get first event timestamp for run
470_313_0.0001_2500_200/train
WARNING:tensorflow:Unable to get first event timestamp for run
470_313_0.0001_2500_200/train
WARNING:tensorflow:Unable to get first event timestamp for run
470_313_0.0001_2500_200/val
WARNING:tensorflow:Unable to get first event timestamp for run
470_313_0.0001_2500_50/train
WARNING:tensorflow:Unable to get first event timestamp for run
470_313_0.0001_2500_50/val
Run Code Online (Sandbox Code Playgroud)
知道发生了什么吗?
I am running a cloud ML engine job and my tensorboard plots are showing the fraction of zero values for my hidden layers steadily increasing towards 1 as the number of steps increases. How should this plot be interpreted? I believe it is a good thing as more zero values would suggest that the model is getting more "certain" about the predictions that it is making.
自从我更新到TensorFlow v1.4后,我无法运行TensorBoard.最初我遇到了一个与之相关的问题flags(就像我在这里发布的那样).事实上,我重新安装了TensorFlow,并了解到修复程序已经存在,但现在我收到此错误:
Traceback (most recent call last):
File "/opt/python/3.6.3/bin/tensorboard", line 7, in <module>
from tensorboard.main import run_main
ImportError: cannot import name 'run_main'
Run Code Online (Sandbox Code Playgroud)
无论是否提供日志目录,我都会收到此错误.什么是修复,我可以做些什么来调查?
我是Tensorflow ecoysystem的新手.我试图做的是打开上面引用的文件/opt/python/3.6.3/bin/tensorboard.我看到以下内容:
#!/opt/python/3.6.3/bin/python3.6
# -*- coding: utf-8 -*-
import re
import sys
from tensorboard.main import run_main
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
sys.exit(run_main())
Run Code Online (Sandbox Code Playgroud)
我看了看tensorboard.main,我什么也没看见命名run_main,但我确实看到了def main,所以我试图改变import run_main,并run_main()以main但使我回flags错误.我究竟做错了什么?