Skip to content

Commit 825edcc

Browse files
committed
Type fixes, remove old comments
1 parent 0893f5d commit 825edcc

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

timm/data/naflex_loader.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,7 @@ def __call__(self, batch):
3636
assert isinstance(batch[0], tuple)
3737
batch_size = len(batch)
3838

39-
# FIXME
40-
# get seq len from sampler schedule
41-
42-
# resize to final size based on seq_len and patchify
39+
# Resize to final size based on seq_len and patchify
4340

4441
# Extract targets
4542
targets = torch.tensor([item[1] for item in batch], dtype=torch.int64)

timm/data/naflex_transforms.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,7 @@ def __init__(
575575

576576
@staticmethod
577577
def get_params(
578-
img: Union[torch.Tensor, Image],
578+
img: torch.Tensor,
579579
scale: Tuple[float, float],
580580
ratio: Tuple[float, float],
581581
crop_attempts: int = 10,
@@ -690,7 +690,7 @@ def get_params(
690690

691691
return (top, left, crop_h, crop_w), final_size, interpolation
692692

693-
def forward(self, img: Union[torch.Tensor, Image]) -> torch.Tensor:
693+
def forward(self, img: torch.Tensor) -> torch.Tensor:
694694
# Sample crop, resize, and interpolation parameters
695695
crop_params, final_size, interpolation = self.get_params(
696696
img,

0 commit comments

Comments
 (0)