- Python Reinforcement Learning
- Sudharsan Ravichandiran Sean Saito Rajalingappaa Shanmugamani Yang Wenzhuo
- 158字
- 2021-06-24 15:17:29
TensorBoard
TensorBoard is TensorFlow's visualization tool that can be used to visualize the computational graph. It can also be used to plot various quantitative metrics and the results of several intermediate calculations. Using TensorBoard, we can easily visualize complex models, which will be useful for debugging and also sharing.
Now, let's build a basic computation graph and visualize that in TensorBoard.
First, let's import the library:
import tensorflow as tf
Next, we initialize the variables:
a = tf.constant(5)
b = tf.constant(4)
c = tf.multiply(a,b)
d = tf.constant(2)
e = tf.constant(3)
f = tf.multiply(d,e)
g = tf.add(c,f)
Now, we will create a TensorFlow session. We will write the results of our graph to a file called event using tf.summary.FileWriter():
with tf.Session() as sess:
writer = tf.summary.FileWriter("output", sess.graph)
print(sess.run(g))
writer.close()
In order to run the TensorBoard, go to your Terminal, locate the working directory, and type tensorboard --logdir=output --port=6003.
You can see the output as shown next:

- 企業(yè)數(shù)字化創(chuàng)新引擎:企業(yè)級(jí)PaaS平臺(tái)HZERO
- Python金融大數(shù)據(jù)分析(第2版)
- Oracle RAC 11g實(shí)戰(zhàn)指南
- 文本挖掘:基于R語(yǔ)言的整潔工具
- WS-BPEL 2.0 Beginner's Guide
- 大數(shù)據(jù)架構(gòu)和算法實(shí)現(xiàn)之路:電商系統(tǒng)的技術(shù)實(shí)戰(zhàn)
- MySQL 8.x從入門到精通(視頻教學(xué)版)
- SQL優(yōu)化最佳實(shí)踐:構(gòu)建高效率Oracle數(shù)據(jù)庫(kù)的方法與技巧
- 信息學(xué)競(jìng)賽寶典:數(shù)據(jù)結(jié)構(gòu)基礎(chǔ)
- HikariCP連接池實(shí)戰(zhàn)
- 數(shù)據(jù)庫(kù)應(yīng)用系統(tǒng)開發(fā)實(shí)例
- Visual Studio 2013 and .NET 4.5 Expert Cookbook
- 大數(shù)據(jù)技術(shù)原理與應(yīng)用:概念、存儲(chǔ)、處理、分析與應(yīng)用
- 實(shí)現(xiàn)領(lǐng)域驅(qū)動(dòng)設(shè)計(jì)
- MySQL數(shù)據(jù)庫(kù)實(shí)用教程