Skip to content

Commit d7e8492

Browse files
committed
Minor docstring fix
1 parent b820aad commit d7e8492

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

torchvision/transforms/v2/_misc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@ class SanitizeKeyPoints(Transform):
496496
min_invalid_points (int or float, optional): Minimum number or fraction of invalid keypoints required
497497
for a group of keypoints to be removed. For example, setting this to 1 will remove a group of keypoints
498498
if any of its keypoints is invalid, while setting it to 2 will only remove groups with at least 2 invalid keypoints.
499-
If a float in (0.0, 1.0) is passed, it represents a fraction of the total number of keypoints in
499+
If a float in ``(0.0, 1.0]`` is passed, it represents a fraction of the total number of keypoints in
500500
the group. For example, setting this to 0.3 will remove groups of keypoints with at least 30% invalid keypoints.
501501
Note that a value of `1` (integer) is very different from `1.0` (float). The former will remove groups
502502
with any invalid keypoint, while the latter will only remove groups where all keypoints are invalid.

torchvision/transforms/v2/functional/_misc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,7 @@ def sanitize_keypoints(
480480
min_invalid_points (int or float, optional): Minimum number or fraction of invalid keypoints required
481481
for a group of keypoints to be removed. For example, setting this to 1 will remove a group of keypoints
482482
if any of its keypoints is invalid, while setting it to 2 will only remove groups with at least 2 invalid keypoints.
483-
If a float in (0.0, 1.0) is passed, it represents a fraction of the total number of keypoints in
483+
If a float in ``(0.0, 1.0]`` is passed, it represents a fraction of the total number of keypoints in
484484
the group. For example, setting this to 0.3 will remove groups of keypoints with at least 30% invalid keypoints.
485485
Note that a value of `1` (integer) is very different from `1.0` (float). The former will remove groups
486486
with any invalid keypoint, while the latter will only remove groups where all keypoints are invalid.

0 commit comments

Comments
 (0)