April 2019
Intermediate to advanced
426 pages
11h 13m
English
Let's review the callback_history variable, which is the History object populated during the fit() command. The History.history attribute is a dictionary containing four keys, storing the accuracy and loss values during training and validation. These are represented as a list of values saved after every epoch. Extract this information into separate variables:
In [ ]: train_acc = callback_history.history['acc'] val_acc = callback_history.history['val_acc'] train_loss = callback_history.history['loss'] val_loss = callback_history.history['val_loss']
Plot the training and validation loss with the following codes:
In [ ]: %matplotlib inline import matplotlib.pyplot as plt epochs = range(1, ...
Read now
Unlock full access