Skip validation for the first few epochs #12873
Answered
by
akihironitta
sangrockEG
asked this question in
Lightning Trainer API: Trainer, LightningModule, LightningDataModule
-
Hi, PL. Is there any way to skip validation for the first few epochs (ex. 10)? But the thing I want is different from this. Since I'm a beginner, any comment would be greatly appreciated. |
Beta Was this translation helpful? Give feedback.
Answered by
akihironitta
Apr 25, 2022
Replies: 1 comment 3 replies
-
Hi @sangrockEG! You can utilise def validation_step(self, batch, batch_idx):
if self.current_epoch <= 9:
return https://pytorch-lightning.readthedocs.io/en/stable/common/lightning_module.html#current-epoch |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
sangrockEG
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @sangrockEG! You can utilise
self.current_epoch
in your LightningModule:https://pytorch-lightning.readthedocs.io/en/stable/common/lightning_module.html#current-epoch