Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update PL example for reproducibility #269

Open
rsokl opened this issue Apr 24, 2022 · 0 comments
Open

Update PL example for reproducibility #269

rsokl opened this issue Apr 24, 2022 · 0 comments
Labels
documentation Improvements or additions to documentation

Comments

@rsokl
Copy link
Contributor

rsokl commented Apr 24, 2022

https://pytorch-lightning.readthedocs.io/en/stable/common/trainer.html#reproducibility

from pytorch_lightning import Trainer, seed_everything

seed_everything(42, workers=True)
# sets seeds for numpy, torch and python.random.
model = Model()
trainer = Trainer(deterministic=True)
@rsokl rsokl added the documentation Improvements or additions to documentation label Apr 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant