nb_epochs = 4
history = model.fit(X_train, y_train, batch_size=batch_size, nb_epoch=
    nb_epochs, validation_data=(X_test, y_test), show_accuracy=True)
How to get both score and accuracy after training