How to plot loss curve in Tensorflow without using

2019-07-13 02:38发布

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?

Really appreciated!

1条回答
虎瘦雄心在
2楼-- · 2019-07-13 03:05

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)
查看更多
登录 后发表回答