Update training_loop.py (#913)

This commit is contained in:
William Falcon 2020-02-22 05:15:36 -05:00 committed by GitHub
parent 4ac9925dad
commit 446a1e23d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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)