The results (loss after a certain number of epochs) will be the same every time if you initialize the pseudorandom number generator (np.random.seed(1234)
) before importing Keras and restart the Python interpreter between the runs.
Edit: [The above solution works with Theano backend but not with TensorFlow backend.](https://github.com/keras-team/keras/issues/2280)