From f4f4a81abe47a68addb3c2651b1e4881f929fde8 Mon Sep 17 00:00:00 2001 From: Ashwin Nair Date: Wed, 3 Apr 2024 14:32:41 +0400 Subject: [PATCH] mypy-fix --- torchgeo/models/swin.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/torchgeo/models/swin.py b/torchgeo/models/swin.py index 1fc0815f572..368c4956ad6 100644 --- a/torchgeo/models/swin.py +++ b/torchgeo/models/swin.py @@ -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, )