tensorboard 之 TF可视化
tensorboard是TF提供的一个可视化的工具 
1.tensorboard可视化的数据来源?
  将tensorflow程序运行过程中输出的日志文件进行可视化展示.
      1.1 tensorflow怎样输出日志文件呢?
    tf.summary.FileWriter
      The FileWriter class provides a mechanism to create an event file in a given directory and add summaries and events to it. The class updates the file contents asynchronously. This allows a trainin
g program to call methods to add data to the file directly from the training loop, without slowing down training.
  FileWriter类使tensorboard支持异步更新程序运行状态;即tensorflow程序在在训练过程中,tensorboard可以实时的显示数据的变化
      tb_ex1.py---简单的日志文件的tensorboard可视化程序

2.tensorboard可以将哪些数据进行可视化?
      2.1 神经网络结构(graph)的可视化
    利用命名空间使神经网络模型的结构更加清晰
      tb_ex2.py---通过命名空间,使计算图的结构更加简洁

  2.2 TF计算节点的运行时间和内存占用可视化
    2.2.1 tf.RunOptions()#配置运行时需要记录的信息的protocolmessage
    2.2.2 tf.RunMetadata()#运行时记录运行信息的protocolmessage
    2.2.3 sess.run(options=run_options, run_metadata=run_metadata)
      run(
        fetches,
        feed_dict=None,
        options=None,
        run_metadata=None
      )
      The optional options argument expects a [RunOptions] proto. The options allow controlling the behavior of this particular step (e.g. turning tracing on).
      The optional run_metadata argument expects a [RunMetadata] proto. When appropriate, the non-Tensor output of this step will be collected there. For example, when users turn on tracing in options, 
the profiled info will be collected into this argument and passed back.
      将配置信息和记录运行信息的protocol buffer传入 运行的过程,从而记录运行时每一个节点的时间,空间的开销信息
    2.2.4 FileWriter.add_run_metadata(run_metadata,)#将节点运行时的信息写入日志文件
      add_run_metadata(
        run_metadata,
        tag,
        global_step=None
      )
      Adds a metadata information for a single session.run() call.
      Args:
        run_metadata: A RunMetadata protobuf object.
        tag: The tag name for this metadata.
        global_step: Number. Optional global step counter to record with the StepStats.
    以mnist为例,展示节点的运行时间和内存占用情况
    mnist_inference.py
    mnist_train.py

  2.3 变量指标可视化
    2.1和2.2主要是介绍了tensorboard的GRAPHS视图,来显示TF的NN结构和graph上的节点信息.TB还有SCALARS,IMAGES,AUDIO,DISTRIBUTIONS,HISTOGRAM和TEXT六个界面来可视化其他监控指标.
    2.3.1 tf.summary.scalar TF中标量(scalar)监控数据随着训练(迭代)轮数的变化趋势
    2.3.2 tf.summary.image  TF中使用的图片数据的显示.一般用于可视化当前使用的训练或测试图片
    2.3.3 tf.summary.histogram TF中tensor取值分布的监控数据随着训练(迭代)轮数的变化趋势
    2.3.4 tf.summary.audio  TF中使用的音频数据
    2.3.5 tf.summary.text   TF中使用的文本数据
    tb_mnist_monitor.py---对不同变量指标的监控可视化




tensorboard 之 TF可视化的更多相关文章
- tensorboard实现tensorflow可视化
		
1.工程目录 2.data.input_data.py的导入 在tensorflow更新之后可以进行直接的input_data的导入 # from tensorflow.examples.tutori ...
 - 利用tensorboard将数据可视化
		
注:代码是网上下载的,但是找不到原始出处了,侵权则删 先写出visual类: class TF_visualizer(object): def __init__(self, dimension, ve ...
 - Tensorboard教程:监控指标可视化
		
Tensorflow监控指标可视化 觉得有用的话,欢迎一起讨论相互学习~Follow Me 参考文献 强烈推荐Tensorflow实战Google深度学习框架 实验平台: Tensorflow1.4. ...
 - 使用 TensorBoard 可视化模型、数据和训练
		
使用 TensorBoard 可视化模型.数据和训练 在 60 Minutes Blitz 中,我们展示了如何加载数据,并把数据送到我们继承 nn.Module 类的模型,在训练数据上训练模型,并在测 ...
 - Ubuntu环境下TensorBoard 可视化 不显示数据问题 No scalar data was found...(作者亲测有效)(转)
		
TensorBoard:Tensorflow自带的可视化工具.利用TensorBoard进行图表可视化时遇到了图表不显示的问题. 环境:Ubuntu系统 运行代码,得到TensorFlow的事件文件l ...
 - 【猫狗数据集】利用tensorboard可视化训练和测试过程
		
数据集下载地址: 链接:https://pan.baidu.com/s/1l1AnBgkAAEhh0vI5_loWKw提取码:2xq4 创建数据集:https://www.cnblogs.com/xi ...
 - TensorBoard的使用(结合线性模型)
		
TensorBoard是TensorFlow 的可视化工具.主要为了更方便用户理解 TensorFlow 程序.调试与优化,用户可以用 TensorBoard 来展现 TensorFlow 图像,绘制 ...
 - 机器学习笔记5-Tensorflow高级API之tf.estimator
		
前言 本文接着上一篇继续来聊Tensorflow的接口,上一篇中用较低层的接口实现了线性模型,本篇中将用更高级的API--tf.estimator来改写线性模型. 还记得之前的文章<机器学习笔记 ...
 - tensorboard基础使用
		
github上的tensorboard项目:https://github.com/tensorflow/tensorboard/blob/master/README.md 目录 基础介绍 基本使用 几 ...
 
随机推荐
- cas服务器源码阅读笔记,对标博客
			
对标源码阅读博客:http://www.cnblogs.com/jiuzhongguo/category/375405.html 在CAS中很多地方使用了策略模式,那么根据什么方式来确定使用哪种策略呢 ...
 - iOS开发--地图与定位
			
概览 现在很多社交.电商.团购应用都引入了地图和定位功能,似乎地图功能不再是地图应用 和导航应用所特有的.的确,有了地图和定位功能确实让我们的生活更加丰富多彩,极大的改变了我们的生活方式.例如你到了一 ...
 - PostgreSQL配置文件--其他
			
9 CLIENT CONNECTION DEFAULTS 9.1 Statement Behavior 9.1.1 search_path 字符型 默认:search_path = '"$u ...
 - windows环境phpstorm调试环境搭建
			
一:安装设置xdebug 这个一般有两个步骤1:浏览器的xdebug插件安装,一般用firefox的插件,chrome好像不太好使,chrome安装后的 效果 安装后如下图所示,需要配置IDEKEY ...
 - Spark 开发环境搭建
			
原文见 http://xiguada.org/spark-develop/ 本文基于Spark 0.9.0,由于它基于Scala 2.10,因此必须安装Scala 2.10,否则将无法运行Spar ...
 - 拓扑排序的实现_TopoSort
			
拓扑排序是求一个AOV网(顶点代表活动, 各条边表示活动之间的率先关系的有向图)中各活动的一个拓扑序列的运算, 可用于測试AOV 网络的可行性. 整个算法包含三步: 1.计算每一个顶点的入度, 存入I ...
 - Loadrunner关于页面检查的几个函数详解
			
环境:Loadrunner版本:8.0自建一个test.html文件:<html><head><meta name="google1" content ...
 - error: could not install *smartsocket* listener: cannot bind to 127.0.0.1:5037
			
问题原因:端口5037被占用 解决方案: 方式一:可以用cmd命令 C:\Users\Administrator>netstat -ano | findstr "5037" ...
 - 【Python 数据分析】pandas数据导入
			
导入CSV文件数据 环境 C:\Users\Thinkpad\Desktop\Data\信息表.csv 语法 pd.read_csv(filename):从CSV文件导入数据 实现代码 import ...
 - JDBC2.0操作:结果集,更新,插入,删除,批处理语句
			
JDBC对ResultSet的支持 JDBC最重要的概念是批处理,可以一次完成多个语句的执行. 可滚动的结果集. 如果想创建可滚动的结果集,则在创建PrepareStatement时候必须指定创建的类 ...