You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In notebooks you say: "To ensure we get reproducible results we set the random seed for Python, Numpy and PyTorch.".
But if you do it in a cell of a notebook, it is only valid for that cell, and therefore reproducibility is not guaranteed.
Take a look at this capture.
The text was updated successfully, but these errors were encountered:
@Tikquuss Sorry for the late reply. Just getting back from my Christmas break.
Isn't this the expected result? The way I thought it worked is that once you set a random seed then all calls to random.random() (or a similar function) will still give different results, but if I set the seed again and then called random.random() I'll get the same results as when I first called them.
>>>importrandom>>>random.seed(1)
>>>random.random() # these three calls should give different "random" results0.13436424411240122>>>random.random()
0.8474337369372327>>>random.random()
0.763774618976614>>>random.seed(1) # re-seed here so the next three calls give the same "random" results as above>>>random.random() # which they do0.13436424411240122>>>random.random()
0.8474337369372327>>>random.random()
0.763774618976614
I might not understand how randomness works in Python, please let me know where my mistake is.
In notebooks you say: "To ensure we get reproducible results we set the random seed for Python, Numpy and PyTorch.".
But if you do it in a cell of a notebook, it is only valid for that cell, and therefore reproducibility is not guaranteed.
Take a look at this capture.
The text was updated successfully, but these errors were encountered: