Skip to content

Commit

Permalink
Remove explicit keepdim
Browse files Browse the repository at this point in the history
  • Loading branch information
ashnair1 committed Nov 6, 2024
1 parent 6a581a7 commit d749014
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 6 deletions.
2 changes: 0 additions & 2 deletions torchgeo/datamodules/nasa_marine_debris.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ def __init__(
self.aug = K.AugmentationSequential(
K.Normalize(mean=self.mean, std=self.std), data_keys=None, keepdim=True
)
# https://github.com/kornia/kornia/issues/2848
self.aug.keepdim = True # type: ignore[attr-defined]

self.collate_fn = collate_fn_detection

Expand Down
4 changes: 0 additions & 4 deletions torchgeo/datamodules/vhr10.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,10 @@ def __init__(
data_keys=None,
keepdim=True,
)
self.train_aug.keepdim = True # type: ignore[attr-defined]

self.aug = K.AugmentationSequential(
K.Normalize(mean=self.mean, std=self.std), data_keys=None, keepdim=True
)
# https://github.com/kornia/kornia/issues/2848
self.aug.keepdim = True # type: ignore[attr-defined]

def setup(self, stage: str) -> None:
"""Set up datasets.
Expand All @@ -76,7 +73,6 @@ def setup(self, stage: str) -> None:
self.kwargs['transforms'] = K.AugmentationSequential(
K.Resize(self.patch_size), data_keys=None, keepdim=True
)
self.kwargs['transforms'].keepdim = True
self.dataset = VHR10(**self.kwargs)
generator = torch.Generator().manual_seed(0)
self.train_dataset, self.val_dataset, self.test_dataset = random_split(
Expand Down

0 comments on commit d749014

Please sign in to comment.