Skip to content

Commit

Permalink
remove irrelevant docs in optimizer_step (#4964)
Browse files Browse the repository at this point in the history
Co-authored-by: chaton <thomas@grid.ai>
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
  • Loading branch information
3 people authored Dec 8, 2020
1 parent 2393474 commit cb28f79
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions pytorch_lightning/core/lightning.py
Original file line number Diff line number Diff line change
Expand Up @@ -1232,10 +1232,6 @@ def optimizer_step(self, epoch, batch_idx, optimizer, optimizer_idx,
optimizer.step(closure=optimizer_closure)
optimizer.zero_grad()
Note:
If you also override the :meth:`~pytorch_lightning.core.hooks.ModelHooks.on_before_zero_grad`
model hook don't forget to add the call to it before ``optimizer.zero_grad()`` yourself.
"""
if not isinstance(optimizer, LightningOptimizer):
# wraps into LightingOptimizer only for running step
Expand Down

0 comments on commit cb28f79

Please sign in to comment.