Tracy Gao
Tracy Gao

Reputation: 129

How to plot loss curve in Tensorflow without using Tensorboard?

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!

Upvotes: 4

Views: 7623

Answers (1)

Omegastick
Omegastick

Reputation: 1901

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)

Upvotes: 4

Related Questions