added clarifying comments

This commit is contained in:
William Falcon
2019-07-11 14:57:26 -04:00
parent ed35f4e076
commit 91b3a0aac6
+1
View File
@@ -628,6 +628,7 @@ class Trainer(TrainerIO):
for param in model.parameters():
print(param.grad.float().sum())
# avoid memory leaks
self.batch_loss_value += loss.item()
# gradient update with accumulated gradients