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:
parent
1b76936d1a
commit
25afb4ea50
|
@ -1024,7 +1024,7 @@ class Trainer:
|
|||
else:
|
||||
loss.backward()
|
||||
|
||||
return loss
|
||||
return loss.detach()
|
||||
|
||||
def is_local_master(self) -> bool:
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue