Skip to content

Commit 5de3208

Browse files
lint
1 parent ab78346 commit 5de3208

File tree

1 file changed

+2
-6
lines changed
  • torchvision/transforms/v2/functional

1 file changed

+2
-6
lines changed

torchvision/transforms/v2/functional/_misc.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -513,11 +513,7 @@ def _get_sanitize_keypoints_mask(
513513
original_shape = key_points.shape[:-1]
514514
x, y = key_points[..., 0].squeeze(dim=0), key_points[..., 1].squeeze(dim=0)
515515
valid = (x >= 0) & (x < w) & (y >= 0) & (y < h)
516-
517-
valid = (
518-
valid.flatten(start_dim=1).all(dim=1)
519-
if valid.ndim > 1
520-
else valid.reshape(original_shape)
521-
)
516+
517+
valid = valid.flatten(start_dim=1).all(dim=1) if valid.ndim > 1 else valid.reshape(original_shape)
522518

523519
return valid

0 commit comments

Comments
 (0)