Skip to content

Commit 12fab3a

Browse files
adriancamposfmassa
authored andcommitted
Corrected typo: 5 to 0.5 (#1041)
Values from random.random() are always in the range [0.0, 1.0), so the statement `random.random() > 5` will never be true.
1 parent ec20315 commit 12fab3a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/source/transforms.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ For example, you can apply a functional transform to multiple images like this:
9595
import random
9696
9797
def my_segmentation_transforms(image, segmentation):
98-
if random.random() > 5:
98+
if random.random() > 0.5:
9999
angle = random.randint(-30, 30)
100100
image = TF.rotate(image, angle)
101101
segmentation = TF.rotate(segmentation, angle)

0 commit comments

Comments
 (0)