I'm using Google Colab, and I'm using numpy.random.seed()
and tensorflow.set_seed()
with Keras v2 and Tensorflow v2.x.
However, it still gives me different results in different runs. Is there anything else that I might need to set?
I specify an argument in both of them, I don't leave them without arguments.
np.random.seed(1) # this is in a notebook
... # this is a function called in the notebook
tf.random.set_seed(3)
self.model.fit_generator(
random_cropper(datagen(X, Y)),
steps_per_epoch=STEPS_PER_EPOCH,
epochs=EPOCHS,
verbose=2,
callbacks=callbacks
)
The output, which are the results for each epoch printed by fit_generator
are not identical