eval every n_steps #16179
Answered
by
akihironitta
charlottecaucheteux
asked this question in
Lightning Trainer API: Trainer, LightningModule, LightningDataModule
eval every n_steps
#16179
-
How to run the validation every n_steps? |
Beta Was this translation helpful? Give feedback.
Answered by
akihironitta
Dec 26, 2022
Replies: 1 comment
-
# default used by the Trainer
trainer = Trainer(val_check_interval=1.0)
# check validation set 4 times during a training epoch
trainer = Trainer(val_check_interval=0.25)
# check validation set every 1000 training batches in the current epoch
trainer = Trainer(val_check_interval=1000)
# check validation set every 1000 training batches across complete epochs or during iteration-based training
# use this when using iterableDataset and your dataset has no length
# (ie: production cases with streaming data)
trainer = Trainer(val_check_interval=1000, check_val_every_n_epoch=None) See also: https://pytorch-lightning.readthedocs.io/en/1.8.3/common/trainer.html#val-check-interval |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
akihironitta
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
See also: https://pytorch-lightning.readthedocs.io/en/1.8.3/common/trainer.html#val-check-interval