Skip to content

Commit

Permalink
fix ufmt format
Browse files Browse the repository at this point in the history
  • Loading branch information
venkatram-dev committed Sep 11, 2024
1 parent 4afe54a commit 3233cf7
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions torchvision/tv_tensors/_dataset_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -384,12 +384,7 @@ def wrapper(idx, sample):
coco_ann = dataset.coco.imgToAnns[image_id]
if "masks" in target_keys:
target["masks"] = tv_tensors.Mask(
torch.stack(
[
torch.from_numpy(dataset.coco.annToMask(ann))
for ann in coco_ann
]
),
torch.stack([torch.from_numpy(dataset.coco.annToMask(ann)) for ann in coco_ann]),
)

if "labels" in target_keys:
Expand Down

0 comments on commit 3233cf7

Please sign in to comment.