Skip to content

Commit

Permalink
seriously
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolasHug committed Oct 15, 2024
1 parent d8d9c85 commit 6a7b566
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion torchvision/datasets/celeba.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def __init__(
if mask == slice(None): # if split == "all"
self.filename = splits.index
else:
self.filename = [splits.index[i] for i in torch.squeeze(torch.nonzero(mask))]
self.filename = [splits.index[i] for i in torch.squeeze(torch.nonzero(mask))] # type: ignore[arg-type]
self.identity = identity.data[mask]
self.bbox = bbox.data[mask]
self.landmarks_align = landmarks_align.data[mask]
Expand Down
2 changes: 1 addition & 1 deletion torchvision/datasets/cityscapes.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ def __getitem__(self, index: int) -> Tuple[Any, Any]:

targets.append(target)

target = tuple(targets) if len(targets) > 1 else targets[0]
target = tuple(targets) if len(targets) > 1 else targets[0] # type: ignore[assignment]

if self.transforms is not None:
image, target = self.transforms(image, target)
Expand Down

0 comments on commit 6a7b566

Please sign in to comment.