Skip to content

Commit ecb7786

Browse files
author
donglaiw
committed
fix num_aug in the constructor
1 parent 4e73a5f commit ecb7786

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

connectomics/data/augmentation/test_augmentor.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,10 @@ def __init__(self,
5454
self.do_2d = do_2d
5555
self.scale_factors = scale_factors
5656
self.inference_act = inference_act
57+
if num_aug == 0:
58+
num_aug = None:
5759

58-
if num_aug is not None and num_aug != 0:
60+
if num_aug is not None:
5961
assert num_aug in [4, 8, 16], \
6062
"TestAugmentor.num_aug should be either 4, 8 or 16!"
6163
if self.do_2d: # max num_aug for 2d images
@@ -208,7 +210,7 @@ def update_name(self, name):
208210
r"""Update the name of the output file to indicate applied test-time augmentations.
209211
"""
210212
extension = "_"
211-
if self.num_aug is None or self.num_aug == 0:
213+
if self.num_aug is None:
212214
return name
213215
elif self.num_aug == 4:
214216
extension += "xy"

0 commit comments

Comments
 (0)