Tensorflow细节-Tensorboard可视化-简介
先搞点基础的
注意注意注意,这里虽然很基础,但是代码应注意:
1、从writer开始后边就错开了
2、writer后可以直接接writer.close,也就是说可以:
writer = tf.summary.FileWriter("./log", graph=g)
writer.close()
import tensorflow as tf
g = tf.Graph()
with g.as_default():
input1 = tf.get_variable("input1", shape=[3], dtype=tf.float32, initializer=tf.constant_initializer([1.0, 2.0, 3.0]))
input2 = tf.get_variable("input2", shape=[3], dtype=tf.float32, initializer=tf.constant_initializer([1.0, 2.0, 3.0]))
with tf.name_scope("add_reault"):
output = tf.add_n([input1, input2], name="add")
writer = tf.summary.FileWriter("./log", graph=g)
with tf.Session(graph=g) as sess:
sess.run(tf.global_variables_initializer())
print(sess.run(output))
writer.close()
对命名空间的操作
注意最后两个命名的方式
1、 tf.get_variable不受tf.name_scope的影响
2、倒数第二个的输出是a/Variable:0
3、tf.Variable()既受tf.variable_scope()的影响也受with tf.name_scope("a"):的影响
import tensorflow as tf
with tf.variable_scope("foo"):
a = tf.get_variable("bar", [1])
print(a.name)
with tf.variable_scope("bar"):
b = tf.get_variable("bar", [1])
print(b.name)
with tf.name_scope("a"):
a = tf.Variable([1])
print(a.name)
a = tf.get_variable("b", [1])
print(a.name)
with tf.variable_scope("b",):
tf.get_variable("b", [1])
Tensorflow细节-Tensorboard可视化-简介的更多相关文章
- 学习TensorFlow,TensorBoard可视化网络结构和参数
在学习深度网络框架的过程中,我们发现一个问题,就是如何输出各层网络参数,用于更好地理解,调试和优化网络?针对这个问题,TensorFlow开发了一个特别有用的可视化工具包:TensorBoard,既可 ...
- Tensorflow 之 TensorBoard可视化Graph和Embeddings
windows下使用tensorboard tensorflow 官网上的例子程序都是针对Linux下的:文件路径需要更改 tensorflow1.1和1.3的启动方式不一样 :参考:Running ...
- 基于TensorFlow进行TensorBoard可视化
# -*- coding: utf-8 -*- """ Created on Thu Nov 1 17:51:28 2018 @author: zhen "&q ...
- Tensorflow学习笔记3:TensorBoard可视化学习
TensorBoard简介 Tensorflow发布包中提供了TensorBoard,用于展示Tensorflow任务在计算过程中的Graph.定量指标图以及附加数据.大致的效果如下所示, Tenso ...
- Windows系统,Tensorflow的Tensorboard工具细节问题
随着跟着TensorFlow视频学习,学到Tensorboard可视化工具这里的时候. 在windows,cmd里面运行,tensorboard --logdir=你logs文件夹地址 这行代码,一 ...
- 超简单tensorflow入门优化程序&&tensorboard可视化
程序1 任务描述: x = 3.0, y = 100.0, 运算公式 x×W+b = y,求 W和b的最优解. 使用tensorflow编程实现: #-*- coding: utf-8 -*-) im ...
- TensorFlow(八):tensorboard可视化
import tensorflow as tf from tensorflow.examples.tutorials.mnist import input_data from tensorflow.c ...
- TensorFlow从0到1之TensorBoard可视化数据流图(8)
TensorFlow 使用 TensorBoard 来提供计算图形的图形图像.这使得理解.调试和优化复杂的神经网络程序变得很方便.TensorBoard 也可以提供有关网络执行的量化指标.它读取 Te ...
- Tensorflow 笔记 -- tensorboard 的使用
Tensorflow 笔记 -- tensorboard 的使用 TensorFlow提供非常方便的可视化命令Tensorboard,先上代码 import tensorflow as tf a = ...
随机推荐
- Kafka学习笔记(三)——架构深入
之前搭建好了Kafka的学习环境,了解了具体的配置文件内容,并且测试了生产者.消费者的控制台使用方式,也学习了基本的API.那么下一步,应该学习一下具体的内部流程~ 1.Kafka的工作流程 大致的工 ...
- 《JAVA高并发编程详解》-volatile和synchronized
- 车间管理难?APS系统为你智能排程
对 APS系统不熟或者不了解他的一些运行规则也是在实施项目中导致经常不能正常运行不可忽视的因素,对 APS系统的早期了解是整个项目实施运行的成功至关重要的因素. 如果不了解 APS潜在的因素和运行准则 ...
- WC_Project
个人项目:WC_Project 一.GitHub项目地址 GitHub项目地址:https://github.com/ting9500/WC_GNIT.git 二.PSP表格 PSP2.1 Perso ...
- 【RAC】rac环境下的数据库备份与还原
[RAC]rac环境下的数据库备份与还原 一.1 BLOG文档结构图 一.2 前言部分 一.2.1 导读 各位技术爱好者,看完本文后,你可以掌握如下的技能,也可以学到一些其它你所不知道的知识,~ ...
- 【linux-command】Chrome安装linux-command插件
一.linux-command是什么 550 多个 Linux 命令,内容包含 Linux 命令手册.详解.学习,值得收藏的 Linux 命令速查手册.Githb地址: https://github. ...
- 【Docker】iptables failed: iptables --wait -t nat -A DOCKER -p tcp -d 0/0 --dport 8480 -j DNAT --to-destination 172.17.0.2:80 ! -i docker0: iptables: No chain/target/match by that name
启动容器的时候,出现如下错误: Error response / --dport -j DNAT --to-destination ! -i docker0: iptables: No chain/t ...
- golang之reflection
反射就是程序能够在运行时检查变量和值,求出它们的类型. reflect包实现运行时反射. 创建一个接收任何数据类型任何数值的查询string: func createQuery(q interface ...
- mysql备份脚本(基础版)
#!/bin/bash #authors misery # BAK_DIR=/home/web_code1/backup/mysql_backup/`date +%Y-%m-%d` MYSQL_CMD ...
- C++(四十八) — string容器的基本操作
参考博客:https://blog.csdn.net/qq_37941471/article/details/82107077 https://www.cnblogs.com/danielStudy/ ...