可视化好助手 Tensorboard

  • 4.1 Tensorboard 可视化好帮手1
  • 4.2 Tensorboard 可视化好帮手2

4.1 Tensorboard 可视化好帮手1

  • 效果
  • 搭建图纸
  • 可能会遇到的问题

注意: 本节内容会用到浏览器, 而且与 tensorboard 兼容的浏览器是 Google Chrome. 使用其他的浏览器不保证所有内容都能正常显示.
学会用 Tensorflow 自带的 tensorboard 去可视化我们所建造出来的神经网络是一个很好的学习理解方式. 用最直观的流程图告诉你你的神经网络是长怎样,有助于你发现编程中间的问题和疑问.

相关代码:

# View more python learning tutorial on my Youtube and Youku channel!!!# Youtube video tutorial: https://www.youtube.com/channel/UCdyjiB5H8Pu7aDTNVXTTpcg
# Youku video tutorial: http://i.youku.com/pythontutorial"""
Please note, this code is only for python 3+. If you are using python 2+, please modify the code accordingly.
"""
from __future__ import print_function
import tensorflow as tfdef add_layer(inputs, in_size, out_size, activation_function=None):# add one more layer and return the output of this layerwith tf.name_scope('layer'):with tf.name_scope('weights'):Weights = tf.Variable(tf.random_normal([in_size, out_size]), name='W')with tf.name_scope('biases'):biases = tf.Variable(tf.zeros([1, out_size]) + 0.1, name='b')with tf.name_scope('Wx_plus_b'):Wx_plus_b = tf.add(tf.matmul(inputs, Weights), biases)if activation_function is None:outputs = Wx_plus_belse:outputs = activation_function(Wx_plus_b, )return outputs# define placeholder for inputs to network
with tf.name_scope('inputs'):xs = tf.placeholder(tf.float32, [None, 1], name='x_input')ys = tf.placeholder(tf.float32, [None, 1], name='y_input')# add hidden layer
l1 = add_layer(xs, 1, 10, activation_function=tf.nn.relu)
# add output layer
prediction = add_layer(l1, 10, 1, activation_function=None)# the error between prediciton and real data
with tf.name_scope('loss'):loss = tf.reduce_mean(tf.reduce_sum(tf.square(ys - prediction),reduction_indices=[1]))with tf.name_scope('train'):train_step = tf.train.GradientDescentOptimizer(0.1).minimize(loss)sess = tf.Session()# tf.train.SummaryWriter soon be deprecated, use following
if int((tf.__version__).split('.')[1]) < 12 and int((tf.__version__).split('.')[0]) < 1:  # tensorflow version < 0.12writer = tf.train.SummaryWriter('logs/', sess.graph)
else: # tensorflow version >= 0.12writer = tf.summary.FileWriter("logs/", sess.graph)# tf.initialize_all_variables() no long valid from
# 2017-03-02 if using tensorflow >= 0.12
if int((tf.__version__).split('.')[1]) < 12 and int((tf.__version__).split('.')[0]) < 1:init = tf.initialize_all_variables()
else:init = tf.global_variables_initializer()
sess.run(init)# direct to the local dir and run this in terminal:
# $ tensorboard --logdir=logs

(1)效果

这次我们会介绍如何可视化神经网络。因为很多时候我们都是做好了一个神经网络,但是没有一个图像可以展示给大家看。这一节会介绍一个TensorFlow的可视化工具 — tensorboard

Tensorflow可视化好助手 Tensorboard (四)-Deep Learning相关推荐

  1. 可视化好助手Tensorboard

    Tensorboard 可视化好助手1 注意: 本节内容会用到浏览器, 而且与 tensorboard 兼容的浏览器是 "Google Chrome". 使用其他的浏览器不保证所有 ...

  2. 基于Wide Deep Learning的推荐系统

    我们先来看下Google Inc的paper:Wide & Deep Learning for Recommender Systems. 一.介绍 推荐系统可以看成是一个搜索排序系统,其中输入 ...

  3. Turning Design Mockups Into Code With Deep Learning

    原文链接地址:https://blog.floydhub.com/turning-design-mockups-into-code-with-deep-learning/ Emil Wallner o ...

  4. deep learning list

    版权声明:本文为博主原创文章,未经博主允许不得转载. Free Online Books Deep Learning by Yoshua Bengio, Ian Goodfellow and Aaro ...

  5. TensorFlow和深度学习-无需博士学位(TensorFlow and deep learning without a PhD)

    1. 概述 原文地址: TensorFlow and deep learning,without a PhD Learn TensorFlow and deep learning, without a ...

  6. TensorFlow和深度学习入门教程(TensorFlow and deep learning without a P

    前言 上月导师在组会上交我们用tensorflow写深度学习和卷积神经网络,并把其PPT的参考学习资料给了我们, 这是codelabs上的教程:<TensorFlow and deep lear ...

  7. Tensorflow 可视化 TensorBoard 尝试~

    tensorboard --logdir=/home/ubuntu/temp/log 注意:在阅读本文之前,请务必更新你的浏览器.Chrome大法好!  数据.模型可视化是TensorFlow的一项重 ...

  8. 深度学习教程 TensorFlow and Deep Learning Tutorials

    Google's Deep Learning Tutorials TensorFlow Official Deep Learning Tutorial [中文]. MLP with Dropout T ...

  9. Deep Learning论文笔记之(七)深度网络高层特征可视化

    Deep Learning论文笔记之(七)深度网络高层特征可视化 zouxy09@qq.com http://blog.csdn.net/zouxy09          自己平时看了一些论文,但老感 ...

  10. TensorFlow官方教程《Neural Networks and Deep Learning》译(第一章)

    – 更新中 译自:Neural Networks and Deep Learning 成果预展示 如果你能坚持阅读完本章, 你可以获得如下的成果: 上图中的命令行窗口输出为: Epoch 0: 909 ...

最新文章

  1. 如何混淆(保护)JavaScript? [关闭]
  2. ***程序一般的启动方式
  3. 关于UC、火狐、谷歌浏览器屏蔽布局中广告的解决办法
  4. 计算机在平面设计上的应用,计算机平面设计中设计软件的应用平面设计论文(word版)...
  5. maven deploy plugin_Maven工程概念和关系
  6. 关于盘符里某些文件夹删除不了的解决方案研究
  7. 如何使用SAP事务码SAT进行UI应用的性能分析
  8. python笔试编程题_Python——面试编程题
  9. USB摄像头视频监控项目学习笔记
  10. Redis五种数据类型及应用场景
  11. VMware中centos6.5 minimal 使用NAT模式联网
  12. c语言代码re通常什么错误,C语言,realloc动态内存申请,出现报错double free or corruption (!prev)...
  13. Spring 配置文件
  14. 可以自由停靠的窗体!
  15. 购物直播系统搭建 新型电商开发方案
  16. 使用SHC命令工具加密Shell脚本
  17. python中callable什么意思_Python中的callable()
  18. 正睿OI补题(贪心)
  19. Flyway 报错:Detected applied migration not resolved locally:2和执行脚本错误
  20. JavaCV音视频开发宝典:JavaCV使用gdigrab方式实现windows录屏(windows屏幕画面抓取/采集,可实现高帧率屏幕截屏、录屏功能)

热门文章

  1. Ant Design表格插入图片
  2. 如何更改微信标签名字_微信如何设置备注及标签 来学习吧
  3. 2020车载凯立德懒人包下载_【汽车导航升级】2020抖音最新流行音乐包 无损 可CD刻录福利分享...
  4. win10怎么用计算机二进制,教你如何使用Win10计算器进行进制转换?
  5. 使用pyspider爬取巨量淘宝MM图片 1
  6. 第一次使用码云上传本地项目
  7. 躺平国历险记:两个超平面之间距离的计算
  8. MySQL 如何使用show processlist进行过滤
  9. 华为终端穿戴软件测试,【华为软件测试工程师面试】总共五轮面试外加一个上机的性格测试。-看准网...
  10. js调用qq互联api实现第三方登录