-
In order to have the same results each time my code is run, is general pytorch discussion the most valid, or does TorchIO has its own (easier) way of controlling it? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 13 replies
-
Hi , but the dataselection (and randomness) comes from torch dataloader, so you should also add |
Beta Was this translation helpful? Give feedback.
-
NumPy is not used for random operations, so
I don't think so, but I'm not sure.
No, I don't think so. |
Beta Was this translation helpful? Give feedback.
-
TL;DR version: Adding this made the program fully reproducible across runs: random.seed(30101983)
np.random.seed(30101983)
torch.manual_seed(30101983)
torch.use_deterministic_algorithms(True) |
Beta Was this translation helpful? Give feedback.
TL;DR version: Adding this made the program fully reproducible across runs: