Keras KeyError: ‘acc’ and KeyError: ‘val_acc’ Errors in Keras

Fixing the Fixing the KeyError: ‘acc’ and KeyError: ‘val_acc’ Errors in Keras

Traceback (most recent call last):
File "lenet_mnist_keras.py", line 163, in <module>
graph_training_history(history)
File "lenet_mnist_keras.py", line 87, in graph_training_history
plt.plot(history.history['acc'])
KeyError: 'acc'

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store