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:
@@ -1024,7 +1024,7 @@ class Trainer:
|
|||||||
else:
|
else:
|
||||||
loss.backward()
|
loss.backward()
|
||||||
|
|
||||||
return loss
|
return loss.detach()
|
||||||
|
|
||||||
def is_local_master(self) -> bool:
|
def is_local_master(self) -> bool:
|
||||||
"""
|
"""
|
||||||
|
|||||||
Reference in New Issue
Block a user