Skip to content

Commit 48b8f50

Browse files
committed
1 parent 09c0799 commit 48b8f50

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

RandAugment/augmentations.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,8 @@ def SolarizeAdd(img, addition=0, threshold=128):
9090

9191

9292
def Posterize(img, v): # [4, 8]
93-
v = int(v) + 1
93+
v = int(v)
94+
v = max(1, v)
9495
return PIL.ImageOps.posterize(img, v)
9596

9697

0 commit comments

Comments
 (0)