mirror of
https://github.com/wassname/pytorch-lightning.git
synced 2026-10-26 13:00:58 +08:00
Update training_loop.py (#913)
This commit is contained in:
1 parent
4ac9925dad
commit
446a1e23d7
1 file changed
+1
-1
@@ -594,7 +594,7 @@ class TrainerTrainLoopMixin(ABC):
|
||||
model = self.get_model()
|
||||
with self.profiler.profile('optimizer_step'):
|
||||
if self.use_tpu:
|
||||
xm.optimizer_step(optimizer, barrier=True)
|
||||
xm.optimizer_step(optimizer)
|
||||
else:
|
||||
model.optimizer_step(self.current_epoch, batch_idx,
|
||||
optimizer, opt_idx, optimizer_closure)
|
||||
|
||||
Reference in new issue
Block a user