How to flag certain modules as non-deterministic #11963
-
Hey, Question: How can I set a module/layer in my model-class to always be non-deterministic (irrespective of the Context: I use
Unfortunately, the error does not hint at how to set the module to be non-deterministic and neither does the documentation. Cheers |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Any feedback on this issue? |
Beta Was this translation helpful? Give feedback.
-
Hi @dsethz! The error comes from PyTorch, but not from Lightning, and I think it's not (shouldn't be) feasible even in pure PyTorch because the flag is for reproducibility and if you allow randomness in certain layers, you can't reproduce the same result anymore. |
Beta Was this translation helpful? Give feedback.
Hi @dsethz!
The error comes from PyTorch, but not from Lightning, and I think it's not (shouldn't be) feasible even in pure PyTorch because the flag is for reproducibility and if you allow randomness in certain layers, you can't reproduce the same result anymore.
https://pytorch.org/docs/stable/notes/randomness.html