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. iview2.x版本升级3.x版本icon修改清单

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

  2. Java9模块化(Jigsaw)初识

    Java9经历了多次跳票,终于要在9月份正式发布,原计划Jigsaw在Java7就有的,也终于在Java9里面提供了,简单总结下. 对比 Java9 以前 上面2个图分别对应的分别是JDK8/9的目录 ...

  3. 二十四种设计模式:抽象工厂模式(Abstract Factory Pattern)

    抽象工厂模式(Abstract Factory Pattern) 介绍提供一个创建一系列相关或相互依赖对象的接口,而无需指定它们具体的类. 示例有Message和MessageModel,Messag ...

  4. python的FTP模块

    python本身自带一个FTP模块,可以轻松实现FTP的上传,下载等操作.下面来看看用法: from ftplib import FTP import socket    #用来设置超时时间 FTP. ...

  5. unity reflection probe --- forward deferred transparent opaque

    deferred 和forward reflection probe 的差别 deferred ref是逐像素的 forward是逐 obj 但我还遇到一个问题就是box projection ref ...

  6. 有关ubuntu16.04进行sudo apt-get update更新时出现:‘。。。N: 无法安全地用该源进行更新,所以默认禁用该源。。。’等问题解决方案

    关于ubuntu16.04在 sudo apt-get update 时出现如下错误: 针对这种情况,本人结合网上的解决方案总结出以下方案,三条命令搞定,希望有用. 1. 进入 sources.lis ...

  7. python 实现计算数独

    输入文件格式: 008309100900060004007504800036000540001000600042000970005907300600010008004608200 输出结果: yuan ...

  8. Node.js abaike图片批量下载Node.js爬虫1.01版

    //====================================================== // abaike图片批量下载Node.js爬虫1.01 // 1.01 修正了输出目 ...

  9. vue - webpack.dev.conf.js for merge

    webpack-merge提供了一个merge连接数组并合并创建新对象的对象的函数.如果遇到函数,它将执行它们,通过算法运行结果,然后再次将返回的值包装在函数中. 这种行为在配置webpack时特别有 ...

  10. 改造的unity3d文件打包脚本

    ExportAssetBundles.rar // C# Example // Builds an asset bundle from the selected objects in the proj ...