Different results with the same parameter values in the model(Random state) #224
Answered
by
ourownstory
IpekInceler
asked this question in
Q&A - get help using NeuralProphet
Answered by
ourownstory
Dec 15, 2020
Replies: 2 comments 1 reply
|
hi @IpekInceler and thank you! This is documented at the end of Quickstart in chapter "Reproducibility" For more details, have a look at #147 Let us know if this does not work for you! |
1 reply
Answer selected by
IpekInceler
|
This is helpful, but I don't think it covers everything. The code for np.random.seed(seed)
torch.manual_seed(seed)This PyTorch thread discusses the many ways you can set a random seed and that the above two lines may not be enough. The most popular answer recommends doing this torch.manual_seed(seed)
torch.cuda.manual_seed(seed)
torch.cuda.manual_seed_all(seed) # if you are using multi-GPU.
np.random.seed(seed) # Numpy module.
random.seed(seed) # Python random module.
torch.manual_seed(seed)
torch.backends.cudnn.benchmark = False
torch.backends.cudnn.deterministic = True |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

hi @IpekInceler and thank you!
This is documented at the end of Quickstart in chapter "Reproducibility"
https://ourownstory.github.io/neural_prophet/
For more details, have a look at #147
Let us know if this does not work for you!