Why does Trainer.predict() overwrite drop_last of the dataloader? #15392
Unanswered
martinwimpff
asked this question in
Lightning Trainer API: Trainer, LightningModule, LightningDataModule
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I observed the strange behaviour that the
predict
function ofTrainer
overwrites thedrop_last
argument of myDataLoader
toFalse
.I know that this is useful for the majority of applications, as one typically wants to have the predictions for all datapoints. Yet, I am not sure whether Lightning should override the original datamodule. For me it is not really intuitive and kind of an odd behaviour. The fact that the
test
function does not have this behaviour is even stranger. In my opinion, such a "feature" should either be incorporated in both functions or neither one of them.Beta Was this translation helpful? Give feedback.
All reactions