"git@developer.sourcefind.cn:OpenDAS/torchaudio.git" did not exist on "e885204ea0d343b8bddd7e829b9e7b29e7c5a9bb"
Commit 12fab3a2 authored by Adrian Campos's avatar Adrian Campos Committed by Francisco Massa
Browse files

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.
parent ec203153
...@@ -95,7 +95,7 @@ For example, you can apply a functional transform to multiple images like this: ...@@ -95,7 +95,7 @@ For example, you can apply a functional transform to multiple images like this:
import random import random
def my_segmentation_transforms(image, segmentation): def my_segmentation_transforms(image, segmentation):
if random.random() > 5: if random.random() > 0.5:
angle = random.randint(-30, 30) angle = random.randint(-30, 30)
image = TF.rotate(image, angle) image = TF.rotate(image, angle)
segmentation = TF.rotate(segmentation, angle) segmentation = TF.rotate(segmentation, angle)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment