self.global_step understanding #8007
Unanswered
ajinkyaambatwar
asked this question in
Lightning Trainer API: Trainer, LightningModule, LightningDataModule
Replies: 1 comment 2 replies
-
global step is incremented after each training step is fully processed and optimizer has stepped and logger has logged.
It will be 200 * 2 and it means batches 0 to (200 * 2 - 1) have been processed (total 400) and the next batch will be the index 400. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I had a doubt about the keyword
self.global_step
Does it represent the total number of batches seen so far or total number of samples seen so far.
For eg. If I have batch size of 32 and each epoch has 200 batches(total of 6400 samples). After 2 epochs, what should be the value of
self.global_step
?Now I intend to use this concept for scheduling my LR using LambdaLR. I intend to update it after 20000(decay_step) steps. So is my lr_lbmd inside
configure_optimizer
right? Or should I just useint(self.global_step/self.hparams["optimizer.decay_step])
?Beta Was this translation helpful? Give feedback.
All reactions