Change the scheduler interval in CLI #13975
Answered
by
carmocca
ForJadeForest
asked this question in
Lightning Trainer API: Trainer, LightningModule, LightningDataModule
-
I just trying to use lr_scheduler:
class_path: StepLR
init_args:
step_size : 10
gamma : 0.5 I guess the CLI will set the |
Beta Was this translation helpful? Give feedback.
Answered by
carmocca
Aug 3, 2022
Replies: 2 comments 3 replies
-
cc: @carmocca |
Beta Was this translation helpful? Give feedback.
0 replies
-
This is not possible from the yaml file. If you need to customize the learning rate scheduler configuration, you can do so by overriding: class MyLightningCLI(LightningCLI):
@staticmethod
def configure_optimizers(lightning_module, optimizer, lr_scheduler=None):
if lr_scheduler is None:
return optimizer
return {
"optimizer": optimizer,
"lr_scheduler": {"scheduler": lr_scheduler, "interval": "step"},
} |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
carmocca
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is not possible from the yaml file. If you need to customize the learning rate scheduler configuration, you can do so by overriding: