import tensorflow as tf tf.keras.utils.set_random_seed(9) tf.config.experimental.enable_op_determinism()