Training the Keras model