Skip to content

Commit

Permalink
Fix error in pre-optim logic (#5995)
Browse files Browse the repository at this point in the history
  • Loading branch information
SeanNaren committed Feb 16, 2021
1 parent b5d7d08 commit b40d414
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pytorch_lightning/plugins/precision/apex_amp.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ def pre_optimizer_step(

if not pl_module.automatic_optimization:
pl_module.trainer.call_hook("on_after_backward")
optimizer.step()

optimizer.step()

return False

0 comments on commit b40d414

Please sign in to comment.