如何在不使用Tensorboard的情况下在Tensorflow中绘制损耗曲线? [英] How to plot loss curve in Tensorflow without using Tensorboard?

查看:407
本文介绍了如何在不使用Tensorboard的情况下在Tensorflow中绘制损耗曲线?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嘿,我是Tensorflow的新手.我使用DNN训练模型,我想绘制损耗曲线.但是,我不想使用Tensorboard,因为我对此并不熟悉.我想知道是否有可能在每个步骤中提取损失信息信息并使用其他绘图程序包或scikit-learn对其进行绘图?

Hey I am new to Tensorflow. I used DNN to train the model and I would like to plot the loss curve. However, I do not want to use Tensorboard since I am really not familiar with that. I wonder whether it is possible to extract the loss info info in each step and plot it use other plotting package or scikit-learn?

非常感谢!

推荐答案

更改您的sess.run(training_function, feed_dict)语句,使其也包含损失函数.然后使用Matplotlib之类的东西来绘制数据.

Change your sess.run(training_function, feed_dict) statement so it includes your loss function as well. Then use something like Matplotlib to plot the data.

_, loss = sess.run((training_function, loss_function), feed_dict)
loss_list.append(loss)
import matplotlib.pyplot as plt
plt.plot(loss_list)

这篇关于如何在不使用Tensorboard的情况下在Tensorflow中绘制损耗曲线?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆