How to visualize the history of network learning: accuracy, loss in graphs using matplotlib
Short summary:
This article most the same as my previous article but with little changes:
If you want just to look at the notebook or just run code please click here
So, Let’s start :)
So for visualizing the history of network learning: accuracy, loss in graphs
you need to run this code after your training
#Plot the Graph# Loss Curves
plt.figure(figsize=[8,6])
plt.plot(history.history['loss'],'r',linewidth=3.0)
plt.plot(history.history['val_loss'],'b',linewidth=3.0)
plt.legend(['Training loss', 'Validation Loss'],fontsize=18)
plt.xlabel('Epochs ',fontsize=16)
plt.ylabel('Loss',fontsize=16)
plt.title('Loss Curves',fontsize=16)
# Accuracy Curves
plt.figure(figsize=[8,6])
plt.plot(history.history['accuracy'],'r',linewidth=3.0)
plt.plot(history.history['val_accuracy'],'b',linewidth=3.0)
plt.legend(['Training Accuracy', 'Validation Accuracy'],fontsize=18)
plt.xlabel('Epochs ',fontsize=16)
plt.ylabel('Accuracy',fontsize=16)
plt.title('Accuracy Curves',fontsize=16)
we should have a result like this:
Result:
We created the visualize the history of network learning: accuracy, loss in graphs via matplotlib.
If you want just to look at the notebook or just run code please click here