Got rid of world_size attribute

This commit is contained in:
yoshikisd
2025-08-01 21:50:35 +00:00
parent 0785eae552
commit 76bc2fa75b
+1 -1
View File
@@ -178,7 +178,7 @@ class Reconstructor:
loss.backward()
# Normalize the accumulating total loss
total_loss += loss.detach() // self.model.world_size
total_loss += loss.detach()
# If we have a regularizer, we can calculate it separately,
# and the gradients will add to the minibatch gradient