Different results with the same parameter values in the model(Random state) #224
-
Beta Was this translation helpful? Give feedback.
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! |
Beta Was this translation helpful? Give feedback.
-
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 |
Beta Was this translation helpful? Give feedback.
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!