April 2018
Beginner to intermediate
300 pages
7h 34m
English
We have specified the callbacks that store the loss and accuracy information for each epoch to be saved as the variable history. We can retrieve this data from the dictionary history.history. Let's check out the dictionary keys:
print(history.history.keys())
This will output dict_keys(['loss', 'acc']).
Next, we will plot out the loss function and accuracy along epochs in line graphs:
import pandas as pdimport matplotlibmatplotlib.style.use('seaborn')# Here plots the loss function graph along Epochspd.DataFrame(history.history['loss']).plot()plt.legend([])plt.xlabel('Epoch')plt.ylabel('Loss')plt.title('Validation loss across 100 epochs',fontsize=20,fontweight='bold')plt.show()# Here plots the ...Read now
Unlock full access