Skip to content

Commit 186075e

Browse files
authored
Merge pull request #244 from hollance/master
Bug fix: test_time_pool would be set to a non-False value
2 parents 4be5b51 + f04bdc8 commit 186075e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Diff for: inference.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def main():
7373
(args.model, sum([m.numel() for m in model.parameters()])))
7474

7575
config = resolve_data_config(vars(args), model=model)
76-
model, test_time_pool = model, False if args.no_test_pool else apply_test_time_pool(model, config)
76+
model, test_time_pool = (model, False) if args.no_test_pool else apply_test_time_pool(model, config)
7777

7878
if args.num_gpu > 1:
7979
model = torch.nn.DataParallel(model, device_ids=list(range(args.num_gpu))).cuda()

Diff for: validate.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ def validate(args):
139139
_logger.info('Model %s created, param count: %d' % (args.model, param_count))
140140

141141
data_config = resolve_data_config(vars(args), model=model)
142-
model, test_time_pool = model, False if args.no_test_pool else apply_test_time_pool(model, data_config)
142+
model, test_time_pool = (model, False) if args.no_test_pool else apply_test_time_pool(model, data_config)
143143

144144
if args.torchscript:
145145
torch.jit.optimized_execution(True)

0 commit comments

Comments
 (0)