February 2019
Beginner to intermediate
308 pages
7h 42m
English
Let's plot the validation accuracy per epoch for the three different models. First, we plot for the model trained using the sgd optimizer:
from matplotlib import pyplot as pltplt.plot(range(1,11), SGD_score.history['acc'], label='Training Accuracy')plt.plot(range(1,11), SGD_score.history['val_acc'], label='Validation Accuracy')plt.axis([1, 10, 0, 1])plt.xlabel('Epoch')plt.ylabel('Accuracy')plt.title('Train and Validation Accuracy using SGD Optimizer')plt.legend()plt.show()
We get the following output:

Did you notice anything wrong? The training and validation accuracy is stuck at 50%! Essentially, this shows that the ...