Skip to main content
Add information about the solution not working with TensorFlow backend right now
Source Link
tuomastik
  • 1.2k
  • 10
  • 22

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)

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.

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)
Source Link
tuomastik
  • 1.2k
  • 10
  • 22

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.