Train.predict() call in callback raises an error #8914
Unanswered
chamecall
asked this question in
Lightning Trainer API: Trainer, LightningModule, LightningDataModule
Replies: 1 comment
-
Dear @chamecall, Lightning doesn't support well calling an entry point such as Here is what happens: What are the best practice: Best, |
Beta Was this translation helpful? Give feedback.
0 replies
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.
Uh oh!
There was an error while loading. Please reload this page.
-
What I try to do is to make predictions on some data after every epoch to see a train tendency.
So I created callback like that
and added it to the callbacks parameter:
trainer = pl.Trainer(max_epochs=1, limit_train_batches=1., limit_val_batches=1., num_sanity_val_steps=0, val_check_interval=1.0, callbacks=[ visualizer])
but after I call trainer.fit() I get my visualization plot and error immediately after that
So the questions themselves are the following:
what’s the reason of the behaviour?
what’s the best practice to do what I want?
Beta Was this translation helpful? Give feedback.
All reactions