- 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:

- ETL數據整合與處理(Kettle)
- 數據之巔:數據的本質與未來
- App+軟件+游戲+網站界面設計教程
- 企業大數據系統構建實戰:技術、架構、實施與應用
- 大數據時代下的智能轉型進程精選(套裝共10冊)
- Spark大數據編程實用教程
- 探索新型智庫發展之路:藍迪國際智庫報告·2015(上冊)
- Spark分布式處理實戰
- 區域云計算和大數據產業發展:浙江樣板
- Google Cloud Platform for Architects
- Oracle 內核技術揭密
- Machine Learning for Mobile
- Unity 4.x Game AI Programming
- 大數據理論與工程實踐
- Getting Started with Review Board