Pytorch-lightning: Number of training steps

Created on 28 Aug 2020  路  3Comments  路  Source: PyTorchLightning/pytorch-lightning

Is it possible to know within the LighthingModule the total number of training steps? I.e , what's going to be the value of self.trainer.global_step at the end of the training? I would need this info to set T_max in CosineAnnealingLR.

question won't fix

Most helpful comment

Got it, thanks for your reply. So max_steps should be computed based on the number of epochs, the batch size and the number GPUs, somewhere before instantiating the Trainer. It would be useful to have a function in the Trainer that does that.

All 3 comments

One possibility is setting the max_steps parameter in Trainer.

Just make sure the number of steps will be greater than max_epochs, otherwise, it will complete early!

Got it, thanks for your reply. So max_steps should be computed based on the number of epochs, the batch size and the number GPUs, somewhere before instantiating the Trainer. It would be useful to have a function in the Trainer that does that.

This issue has been automatically marked as stale because it hasn't had any recent activity. This issue will be closed in 7 days if no further activity occurs. Thank you for your contributions, Pytorch Lightning Team!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

williamFalcon picture williamFalcon  路  3Comments

justusschock picture justusschock  路  3Comments

monney picture monney  路  3Comments

srush picture srush  路  3Comments

jcreinhold picture jcreinhold  路  3Comments