Documentation Example of Truncated BPTT is not working; self.optimizer.step()
makes no sense
#20517
Labels
self.optimizer.step()
makes no sense
#20517
📚 Documentation
The example of TBPTT
https://lightning.ai/docs/pytorch/stable/common/tbptt.html
contains a couple of weird lines with
self.optimizer.step()
andself.optimizer.zero_grad()
Also, shouldn't one use
self.manual_backward
instead ofself.backward
?Also, in another documentation page you state that calling
optimizer.step
right beforebackward
is preferred and good practice, yet you don't do it hereIt would make more sense to write
cc @Borda
The text was updated successfully, but these errors were encountered: