Skip to content

Commit

Permalink
Fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
adamjstewart committed May 11, 2023
1 parent 40bf3b4 commit 8795ffa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions torchgeo/trainers/moco.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def moco_augmentations(
ks = size // 10 // 2 * 2 + 1
if version == 1:
# Same as InstDict: https://arxiv.org/abs/1805.01978
aug1, aug2 = K.AugmentationSequential(
aug1 = aug2 = K.AugmentationSequential(
K.RandomResizedCrop(size=(size, size), scale=(0.2, 1)),
T.RandomGrayscale(weights=weights, p=0.2),
# Not appropriate for multispectral imagery, seasonal contrast used instead
Expand All @@ -67,7 +67,7 @@ def moco_augmentations(
)
elif version == 2:
# Similar to SimCLR: https://arxiv.org/abs/2002.05709
aug1, aug2 = K.AugmentationSequential(
aug1 = aug2 = K.AugmentationSequential(
K.RandomResizedCrop(size=(size, size), scale=(0.2, 1)),
# Not appropriate for multispectral imagery, seasonal contrast used instead
# K.ColorJitter(
Expand Down

0 comments on commit 8795ffa

Please sign in to comment.