-
Notifications
You must be signed in to change notification settings - Fork 705
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How could we control Random State? #6
Comments
OIC.. the random effect seems to be due to the Dropout. |
You're right, there is no shuffling anywhere. Randomness surely comes from dropout + initialization. However, if you carefully control the random seeds, you should get non-random convergence! |
Thanks so much. Although simply setting the random state does not work, I found a page here regarding the exactly the same question. |
maybe you should also set python's random seed fixed |
It seems that even if I set dropout=1, the results are still changing. |
@lovejasmine i have tried but not effective...: ( |
I tried use different tf random seed and I found that the results are very different than before. It seems that the tensorflow is often complained by users about the random state stuff.. |
Have you tried running it on CPU on a subset of the dataset with a batch of size 1 with dropout = 1? I'm not too familiar with tf random seeds, and the stackoverflow post you refered above seems to mention some pretty weird behavior. Batch size = 1 could alleviate the problem they're mentioning. |
@yuchenlin did you make progress on this issue? Should we keep it open or should we close it? |
@guillaumegenthial sorry for the delayed reply! I was busy doing other stuff. Yes, I guess we can close it. It seems that the current methods are difficult to maintain the stable results under the GPU settings. Thanks! |
@yuchenlin no problem! I'll close it, but I must confess that this is an interesting issue and I'd love to hear more about it if you find the answer one day. |
Hi, Guillaume,
I am very confused about why the training result is quite random since it seems that there is no shuffling of the data in the code.
I tried to set
tf.set_random_seed(42)
andnp.random.seed(42)
at the beginning of model.py, but it does not work.Thanks very much,
Bill
The text was updated successfully, but these errors were encountered: