Skip to content

Commit 60fed04

Browse files
committed
#11 and filename bug fix
1 parent 8ab84e4 commit 60fed04

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

RandAugment/augmentations.py

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

9191

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

9696

RandAugment/train.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ def train_and_eval(tag, dataroot, test_ratio=0.0, cv_fold=0, reporter=None, metr
258258
logger.warning('Provide --save argument to save the checkpoint. Without it, training result will not be saved!')
259259

260260
if args.save:
261-
add_filehandler(logger, args.save.replace('.pth', '.log'))
261+
add_filehandler(logger, args.save.replace('.pth', '') + '.log')
262262

263263
logger.info(json.dumps(C.get().conf, indent=4))
264264

0 commit comments

Comments
 (0)