From 7e38f1f2469d768c6416d161214a118e18d4a190 Mon Sep 17 00:00:00 2001 From: William Falcon Date: Tue, 13 Aug 2019 11:54:19 -0400 Subject: [PATCH] updated optimizer_step docs --- docs/LightningModule/RequiredTrainerInterface.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/LightningModule/RequiredTrainerInterface.md b/docs/LightningModule/RequiredTrainerInterface.md index a5ca5bd2b0..58aaef8456 100644 --- a/docs/LightningModule/RequiredTrainerInterface.md +++ b/docs/LightningModule/RequiredTrainerInterface.md @@ -193,7 +193,10 @@ def configure_optimizers(self): disriminator_opt = Adam(self.model_disc.parameters(), lr=0.02) discriminator_sched = CosineAnnealing(discriminator_opt, T_max=10) return [generator_opt, disriminator_opt], [discriminator_sched] -``` +``` + +If you need to control how often those optimizers step or override the default .step() schedule, override +the [optimizer_step](https://williamfalcon.github.io/pytorch-lightning/Trainer/hooks/#optimizer_step) hook. ## Optional Methods