How to add a hidden state in test_step when dealing with sequential data? #5785
Unanswered
kenenbek
asked this question in
Lightning Trainer API: Trainer, LightningModule, LightningDataModule
Replies: 2 comments
-
I am also wondering about this. Anyone found a solution? |
Beta Was this translation helpful? Give feedback.
0 replies
-
Something like this in val and if not hasattr(self, "hiddens"):
self.hiddens = None
out, self.hiddens = self(x, self.hiddens) Is there a possibility to align the training and val/test steps interfaces for these use cases? |
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.
-
I have a
Trainer
withtruncated_bptt_steps
option like this:trainer = pl.Trainer(truncated_bptt_steps=100)
A
training_step
method looks like this:I have a problem because
test_step
doesn't have ahiddens
arguments, butforward
method of a neural network needs it:My current
test_step
looks like this:But when I run the whole model I have an error when reaching
test_step
:Beta Was this translation helpful? Give feedback.
All reactions