【问题标题】:How to plot loss curve in Tensorflow without using Tensorboard?如何在不使用 Tensorboard 的情况下在 Tensorflow 中绘制损失曲线?
【发布时间】:2018-12-01 08:26:45
【问题描述】:

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

非常感谢!

【问题讨论】:

  • 作为刚发现张量板的 TensorFlow 新手,我强烈建议您花时间学习和设置它。这是一个非常棒的工具,可以加快网络设计的迭代速度。

标签: python-3.x tensorflow machine-learning


【解决方案1】:

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

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

【讨论】:

  • loss_function 会是什么样子?
猜你喜欢
  • 2011-11-09
  • 2020-05-03
  • 1970-01-01
  • 2022-10-12
  • 1970-01-01
  • 2017-05-05
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多