TensorBoard一幅图中显示多条曲线
生活随笔
收集整理的這篇文章主要介紹了
TensorBoard一幅图中显示多条曲线
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
原文鏈接點擊打開鏈接
import tensorflow as tf from numpy import randomwriter_1 = tf.summary.FileWriter("./logs/plot_1") writer_2 = tf.summary.FileWriter("./logs/plot_2")log_var = tf.Variable(0.0) tf.summary.scalar("loss", log_var)write_op = tf.summary.merge_all()session = tf.InteractiveSession() session.run(tf.global_variables_initializer())for i in range(100):# for writer 1summary = session.run(write_op, {log_var: random.rand()})writer_1.add_summary(summary, i)writer_1.flush()# for writer 2summary = session.run(write_op, {log_var: random.rand()})writer_2.add_summary(summary, i)writer_2.flush()總結
以上是生活随笔為你收集整理的TensorBoard一幅图中显示多条曲线的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: day-44(2)mysql
- 下一篇: webpack 报错Cannot fin