Skip to content

Commit

Permalink
mypy-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ashnair1 committed Apr 3, 2024
1 parent dc820f8 commit f4f4a81
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions torchgeo/models/swin.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@
_mean = torch.zeros_like(_std)
_sentinel2_ms_satlas_transforms = K.AugmentationSequential(
K.Normalize(mean=_mean, std=_std),
Lambda(lambda x: torch.clamp(x, min=0.0, max=1.0)),
Lambda(lambda x: torch.clamp(x, min=0.0, max=1.0)), # type: ignore[arg-type]
data_keys=None,
)

# Satlas Landsat imagery is 16-bit, normalized by clipping some pixel N with (N-4000)/16320 to (0, 1). # noqa: E501
_landsat_satlas_transforms = K.AugmentationSequential(
K.Normalize(mean=torch.tensor(4000), std=torch.tensor(16320)),
Lambda(lambda x: torch.clamp(x, min=0.0, max=1.0)),
Lambda(lambda x: torch.clamp(x, min=0.0, max=1.0)), # type: ignore[arg-type]
data_keys=None,
)

Expand Down

0 comments on commit f4f4a81

Please sign in to comment.