Access trainer parameters from LightningModule
Hi,
I was wondering how could i access trainer parameters from a LightningModule.
I want indeed to do setup that depend on max_epochs. Configure a linear decay lr scheduler and also i want to take some special action on the validation step on the last epoch.
Thanks for the help!
@nicolas-dufour You can access it with self.trainer.max_epochs.