Skip to content

Commit 2953bc2

Browse files
author
donglaiw
committed
allow aug_num==0
1 parent 1be6d7f commit 2953bc2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

connectomics/data/augmentation/test_augmentor.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def __init__(self,
5555
self.scale_factors = scale_factors
5656
self.inference_act = inference_act
5757

58-
if num_aug is not None:
58+
if num_aug is not None or num_aug == 0:
5959
assert num_aug in [4, 8, 16], \
6060
"TestAugmentor.num_aug should be either 4, 8 or 16!"
6161
if self.do_2d: # max num_aug for 2d images
@@ -208,7 +208,7 @@ def update_name(self, name):
208208
r"""Update the name of the output file to indicate applied test-time augmentations.
209209
"""
210210
extension = "_"
211-
if self.num_aug is None:
211+
if self.num_aug is None or self.num_aug == 0:
212212
return name
213213
elif self.num_aug == 4:
214214
extension += "xy"

0 commit comments

Comments
 (0)