After changing to pytorch-lightning 1.5.2, omitting the argument of trainer.test() does not work. #10747
Answered
by
rohitgr7
Keiku
asked this question in
Lightning Trainer API: Trainer, LightningModule, LightningDataModule
-
In case of pytorch-lightning 1.5.2, omission of argument of trainer.fit(model, datamodule)
trainer.test() If it is below, it worked fine. Is this the expected behavior? trainer.fit(model, datamodule)
trainer.test(model, datamodule.test_dataloader()) I'm currently refactoring the following: Keiku/PyTorch-Lightning-CIFAR10: "Not too complicated" training code for CIFAR-10 by PyTorch Lightning https://github.com/Keiku/PyTorch-Lightning-CIFAR10 |
Beta Was this translation helpful? Give feedback.
Answered by
rohitgr7
Nov 25, 2021
Replies: 1 comment 2 replies
-
yes, you need to pass the datamodule. I think this was the case after v1.5 and not just v1.5.2. |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
Keiku
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
yes, you need to pass the datamodule. I think this was the case after v1.5 and not just v1.5.2.