Is batch_idx required when subclassing LightningModule? #20645
Unanswered
CA4GitHub
asked this question in
Lightning App API: LightningApp, LightningFlow, LightningWork
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The examples I found in the documents (eg https://lightning.ai/docs/pytorch/stable/model/train_model_basic.html) show when defining a subclass of LightningModule, the training_step definition includes batch_idx even though it's not used.
Is this required? Will I break something if I define training_step like
def training_step(self, batch):
Beta Was this translation helpful? Give feedback.
All reactions