File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
docs/source-pytorch/common Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -759,6 +759,9 @@ overfit_batches
759759Uses this much data of the training & validation set.
760760If the training & validation dataloaders have ``shuffle=True ``, Lightning will automatically disable it.
761761
762+ * When set to exactly 1, the same batch is used for both training and validation steps, which is useful for debugging model implementation
763+ * For other values, sequential sampling (no shuffling) is used
764+
762765Useful for quickly debugging or trying to overfit on purpose.
763766
764767.. testcode ::
@@ -768,9 +771,13 @@ Useful for quickly debugging or trying to overfit on purpose.
768771
769772 # use only 1% of the train & val set
770773 trainer = Trainer(overfit_batches=0.01)
771-
772- # overfit on 10 of the same batches
774+
775+ # overfit on 10 (same) train batches & 10 ( same) val batches
773776 trainer = Trainer(overfit_batches=10)
777+
778+ # debug by training and validating on exactly the same single batch
779+ # (useful for verifying model implementation)
780+ trainer = Trainer(overfit_batches=1)
774781
775782plugins
776783^^^^^^^
You can’t perform that action at this time.
0 commit comments