1.简介
tf配套的可视化工具, 将你的张量图画出来.
当训练一个巨大的网络的时候, 计算图既复杂又令人困惑. TensorBoard 提供了一系列的组件, 可以看到 learning rate 的变化, 看到 objective function 的变化.
tfboard 读取 tf 运行时你记下的 events files, 来进行可视化. 这些 events files 包含了你记下的 summary data, 它是 protobuffer 格式, 并非文本文件.
1.1 参考
2.类与方法
tensorflow.python.summary.writer.writer.FileWriter(SummaryToEventTransformer)
类.__init__(self, logdir, graph=None,...)
构造函数, Creates aFileWriter
and an event file.-
tensorflow.python.summary.summary
模块.-
scalar(name, tensor, ..)
Outputs aSummary
protocol buffer containing a single scalar value. -
image(name, tensor, max_outputs=3, collections=None, family=None)
Outputs aSummary
protocol buffer with images.
images are built fromtensor
which must be 4-D with shape[batch_size, height, width, channels]
and wherechannels
can be:- 1-
tensor
is interpreted as Grayscale. - 3-
tensor
is interpreted as RGB. - 4-
tensor
is interpreted as RGBA.
- 1-
-
histogram(name, values, collections=None, family=None)
Adding a histogram summary makes it possible to visualize your data’s distribution in TensorBoard.
-
3.效果截图
图3-1 logdir中的文件
图3-2 炫酷的可视化效果