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可视化的更多相关文章

  1. tensorboard实现tensorflow可视化

    1.工程目录 2.data.input_data.py的导入 在tensorflow更新之后可以进行直接的input_data的导入 # from tensorflow.examples.tutori ...

  2. 利用tensorboard将数据可视化

    注:代码是网上下载的,但是找不到原始出处了,侵权则删 先写出visual类: class TF_visualizer(object): def __init__(self, dimension, ve ...

  3. Tensorboard教程:监控指标可视化

    Tensorflow监控指标可视化 觉得有用的话,欢迎一起讨论相互学习~Follow Me 参考文献 强烈推荐Tensorflow实战Google深度学习框架 实验平台: Tensorflow1.4. ...

  4. 使用 TensorBoard 可视化模型、数据和训练

    使用 TensorBoard 可视化模型.数据和训练 在 60 Minutes Blitz 中,我们展示了如何加载数据,并把数据送到我们继承 nn.Module 类的模型,在训练数据上训练模型,并在测 ...

  5. Ubuntu环境下TensorBoard 可视化 不显示数据问题 No scalar data was found...(作者亲测有效)(转)

    TensorBoard:Tensorflow自带的可视化工具.利用TensorBoard进行图表可视化时遇到了图表不显示的问题. 环境:Ubuntu系统 运行代码,得到TensorFlow的事件文件l ...

  6. 【猫狗数据集】利用tensorboard可视化训练和测试过程

    数据集下载地址: 链接:https://pan.baidu.com/s/1l1AnBgkAAEhh0vI5_loWKw提取码:2xq4 创建数据集:https://www.cnblogs.com/xi ...

  7. TensorBoard的使用(结合线性模型)

    TensorBoard是TensorFlow 的可视化工具.主要为了更方便用户理解 TensorFlow 程序.调试与优化,用户可以用 TensorBoard 来展现 TensorFlow 图像,绘制 ...

  8. 机器学习笔记5-Tensorflow高级API之tf.estimator

    前言 本文接着上一篇继续来聊Tensorflow的接口,上一篇中用较低层的接口实现了线性模型,本篇中将用更高级的API--tf.estimator来改写线性模型. 还记得之前的文章<机器学习笔记 ...

  9. tensorboard基础使用

    github上的tensorboard项目:https://github.com/tensorflow/tensorboard/blob/master/README.md 目录 基础介绍 基本使用 几 ...

随机推荐

  1. AS3.0 Vector的运用

    使用Vector类编程 一个array(数组)就像是把一套变量组织在一起的容器.单个数组可以含有许多不同的值.你可以储存和取得数组中的单个值(也就是数组elements(元素)).你也可以通过直接操作 ...

  2. SpringMVC中拦截器的使用

    什么是拦截器 拦截器通常一般指的是通过拦截从浏览器发往服务器的一些请求来完成某些功能的一段程序代码一般在一个请求发生之前,发生时,发生后我们都可以对请求进行拦截 拦截器可以做什么 拦截器可以用于权限验 ...

  3. opencv Mat 像素操作

    1 cv::Mat cv::Mat是一个n维矩阵类,声明在<opencv2/core/core.hpp>中.   class CV_EXPORTS Mat { public: //a lo ...

  4. iview2.x版本升级3.x版本icon修改清单

    当前公司使用有一个旧项目的前端组件库是iview2.x,入职以来维护该项目过程中碰到2.x版本无数的坑. 最近需求不多,闲来无事把2.x升级到3.x版本了. 新版本除了网上轻易可查到的button组件 ...

  5. 新公司官网项目优化实践(Vue)

    入职后接手website-html和website-mobile项目,发现项目加载速度不太理想,于是结合自己之前的经验对项目做了优化.此篇文章主要记录这次优化详情. 原始项目:开发环境:website ...

  6. 【架构】Twitter高性能RPC框架Finagle介绍

    Twitter的RPC框架Finagle简介 Finagle是Twitter基于Netty开发的支持容错的.协议无关的RPC框架,该框架支撑了Twitter的核心服务.来自Twitter的软件工程师J ...

  7. 用editplus编写python

    语法高亮和自己主动补全: http://www.editplus.com/files/pythonfiles.zip 选择菜单条的-->工具-->配置用户工具-->设置&语法 ...

  8. TestNG 四 测试方法之工厂

    工厂允许你动态的创建测试.例如,假设你需要创建一个测试方法,并用它来多次访问一个web页面,而且每次都带有不同的参数: public class TestWebServer { @Test(param ...

  9. Remove all your local git branches but keep master

    Sometimes after a sprint, all the remaining branches are just taking up space. Here's a small snippe ...

  10. setImmediate 函数详解

    1.兼容性 只有IE10以上的IE浏览器才支持. 2.用途 https://developer.mozilla.org/zh-CN/docs/Web/API/Window/setImmediate 该 ...