Skip to content

Commit

Permalink
Always set distributed flag in loss
Browse files Browse the repository at this point in the history
  • Loading branch information
guarin committed Nov 27, 2023
1 parent b7057eb commit 1c12049
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion benchmarks/imagenet/resnet50/mocov2.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def __init__(self, batch_size_per_device: int, num_classes: int) -> None:
self.criterion = NTXentLoss(
temperature=0.2,
memory_bank_size=(65536, 128),
gather_distributed=self.trainer.num_devices > 1,
gather_distributed=True,
)

self.online_classifier = OnlineLinearClassifier(num_classes=num_classes)
Expand Down

0 comments on commit 1c12049

Please sign in to comment.