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. 降维工具箱drtool

    工具箱下载:http://leelab.googlecode.com/svn/trunk/apps/drtoolbox/ ——————————————————————————————————————— ...

  2. Linux /sbin/service脚本一个基本无影响的bug

    CentOS提供了一个启动服务的功能:service [service name] (start|stop|restart|...),此功能的执行脚本为/sbin/service. 今天看了下此脚本, ...

  3. 以下内容为Stackoverflow上整理以作纪录

    PRO 用IMG标签 Use IMG plus alt attribute if the image is part of the content such as a logo or diagram ...

  4. InternalError: (pymysql.err.InternalError) (1205, u'Lock wait timeout exceeded; try restarting transaction')

    在mysql innodb中使用事务,如果插入或者更新出错,一定要主动显式地执行rollback,否则可能产生不必要的锁而锁住其他的操作 我们在使用数据库的时候,可以使用contextlib,这样异常 ...

  5. 16.同步类容器Collections.synchronized

    voctor动态数组.同步类容器,底层实现基于:Collections.synchronized package demo5; import java.util.ArrayList; import j ...

  6. iOS:tableView表头下拉放大的效果

    现在很多app设置了这样的效果,如何实现这一效果呢,其实只需要简单的两个方法,那么我们直接上代码 首先我们在storyBoard里拖一个tableView并设置Navigation,接下来我们在tab ...

  7. iOS: 适配启动图和图标

    如何设置App的启动图,也就是Launch Image? Step1 1.点击Assets.xcassets 进入图片管理,然后右击,弹出"App Icons & Launch Im ...

  8. 如何打造一款可靠的WAF

    之前写了一篇<WAF防御能力评测及工具>,是站在安全运维人员选型WAF产品的角度来考虑的(优先从测试角度考虑是前职业病,毕竟当过3年游戏测试?!).本篇文章从WAF产品研发的角度来YY如何 ...

  9. pymongo 目标计算机积极拒绝

    今天在使用pymongo连接服务器上的mongodb数据库时出现该问题 其实原因是mongodb本身配置只允许本机连接数据库 打开mongod.conf即mongodb的配置文件 一般来说是vim / ...

  10. DevExpress 中 汉化包 汉化方法

    刚试了一下,直接把汉化包放在 Debug 目录下也是可以的.直接会汉化 第一步: 在Debug 下添加 zh-CN 汉化包(自行下载) 第二步: 在 Program.cs中添加以下代码 : Syste ...