fixed trainer tr_loss memory leak (#6999)

* fixed trainer tr_loss memory leak

* detached returned training loss from computation graph in the Trainer class' training_step() method

* Revert "fixed trainer tr_loss memory leak"

This reverts commit 47226e4e
This commit is contained in:
Stuart Mesham 2020-09-08 14:07:33 +02:00 committed by GitHub
parent 1b76936d1a
commit 25afb4ea50
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -1024,7 +1024,7 @@ class Trainer:
else:
loss.backward()
return loss
return loss.detach()
def is_local_master(self) -> bool:
"""