text_plain_output_1.png
import matplotlib.pyplot as plt

import pandas as pd

train = pd.read_csv('../input/train.csv')
test = pd.read_csv('../input/test.csv')

train_images = train.ix[:, 1:].values.astype('float32')
train_labels = train.ix[:, 0].values.astype('int32')

train_images_reshaped = train_images.reshape(train_images.shape[0], 28, 28)
train_images_reshaped.shape

history_dict = history.history
history_dict.keys()

loss_values = history_dict['loss']
val_loss_values = history_dict['val_loss']
epochs = range(1, len(loss_values) + 1)

plt.clf()
acc_values = history_dict['acc']
val_acc_values = history_dict['val_acc']

history_dict = history.history
loss_values = history_dict['loss']
val_loss_values = history_dict['val_loss']
epochs = range(1, len(loss_values) + 1)
plt.plot(epochs, loss_values, 'bo')
plt.plot(epochs, val_loss_values, 'r^')
plt.xlabel('Epochs')
plt.ylabel('Loss')
plt.show()