tbptt doesn't work with validation #15057
Labels
lightningmodule
pl.LightningModule
loops
Related to the Loop API
question
Further information is requested
Bug description
The
tbptt_split_batch
function doesn't seem to be called beforevalidation_step
andhiddens
also doesn't seem to be passed to thevalidation_step
method of the lightning module.Hence validating a model with a validation_step doesn't seems possible even if training can be achived using tbptt for timeseries data that's to big to fit in on the GPU/ where the loss calculation is to big to fit on the GPU.
My current workarround is as follows:
However it would be great to have the same behaviour as with the
training_step
(iftruncated_bptt_steps
is defined the chuncks are passed tovalidation_step
as well as the hiddens from the last chunk).I'm also not quite sure if my loss aggregation is the same as the one implemented for the training_step losses of the tbptt chunks (mean).
How to reproduce the bug
Error messages and logs
Environment
More info
No response
The text was updated successfully, but these errors were encountered: