Skip to content

Commit

Permalink
fix amp wrong call
Browse files Browse the repository at this point in the history
  • Loading branch information
williamFalcon committed Jun 29, 2020
1 parent 3ff6955 commit 593837e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pytorch_lightning/trainer/training_loop.py
Original file line number Diff line number Diff line change
Expand Up @@ -743,7 +743,8 @@ def call_optimizer_step(self, optimizer, opt_idx, batch_idx, split_batch):
# when using 16-bit
else:
native_amp = self.use_amp and NATIVE_AMP_AVALAIBLE
model.optimizer_step(self.current_epoch, batch_idx, optimizer, opt_idx, lambda_closure, native_amp)
model.optimizer_step(self.current_epoch, batch_idx, optimizer, opt_idx, lambda_closure,
using_native_amp=native_amp)

# in native 16-bit we need to update scaler after optimizer step
if self.use_amp and NATIVE_AMP_AVALAIBLE:
Expand Down

0 comments on commit 593837e

Please sign in to comment.