-
Notifications
You must be signed in to change notification settings - Fork 109
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
Turn the randomness off in order to reproduce results #30
Comments
Use sn.set_random_seed().
Also to get exactly the same results, you need to turn off TF multithreading otherwise order of operations may perturb the outcome.
… On Nov 6, 2021, at 9:25 AM, Bogdan ***@***.***> wrote:
Is there a way to exclude all the stochastics within SciANN so that we get results that can be easily reproduced?
So far I tried
import tensorflow as tf
from numpy.random import seed
import random
_seed = 0
seed(_seed)
random.seed(_seed)
tf.random.set_seed(_seed)
tf.compat.v1.set_random_seed(_seed)
but I am getting different results each time I run the training.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Thank you for your fast response! This is what I did:
Unfortunatelly, I am still getting minor differences in my results. |
Hey @BogdanM1, This tweak worked for me for reproducibility. Let me know it that helps. |
Is there a way to exclude all the stochastics within SciANN so that we get results that can be easily reproduced?
So far I tried
import tensorflow as tf
from numpy.random import seed
import random
but I am getting different results each time I run the training.
The text was updated successfully, but these errors were encountered: