In the general setup of tensor flow, as
model = construct_model()
with tf.Session() as sess:
train_model(sess)
Where it construct_model()contains the definition of the model, including random initialization of weights ( tf.truncated_normal), and train_model(sess)performs model training -
What seeds need to be specified, where to ensure 100% reproducibility between repeated starts of the above code fragment? The documentation for tf.random.set_random_seedmay be brief, but a little confusing to me. I did my best:
tf.set_random_seed(1234)
model = construct_model()
with tf.Session() as sess:
train_model(sess)
But each time received different results.
source
share