mardi 24 octobre 2017

How to Fix Tensorflow Randomseed?

Recently I encounter a weird problem while using Tensorflow:

While I was using a same model, and fixed the seeds:

random.seed(0)
np.random.seed(0)
tf.set_random_seed(0)

at the very beginning of the program, the program returns different values after a period of time. For example, with exactly same parameter setting, the network returns

Worker 1: training step 0 done (global step: 0)
On trainer 1, iteration 0 ps it reaches 0.101100 accuracy

at today, but returns

Worker 1: training step 0 done (global step: 0)
On trainer 1, iteration 0 ps it reaches 0.113500 accuracy

on yesterday.




Aucun commentaire:

Enregistrer un commentaire