fix efficient test bug (#702)

pull/707/head
Junjun2016 2021-07-15 11:42:33 +08:00 committed by GitHub
parent f5be6e2617
commit 75eac77f77
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 2 deletions

View File

@ -31,7 +31,11 @@ class EvalHook(_EvalHook):
return
from mmseg.apis import single_gpu_test
results = single_gpu_test(runner.model, self.dataloader, show=False)
results = single_gpu_test(
runner.model,
self.dataloader,
show=False,
efficient_test=self.efficient_test)
runner.log_buffer.output['eval_iter_num'] = len(self.dataloader)
key_score = self.evaluate(runner, results)
if self.save_best:
@ -84,7 +88,8 @@ class DistEvalHook(_DistEvalHook):
runner.model,
self.dataloader,
tmpdir=tmpdir,
gpu_collect=self.gpu_collect)
gpu_collect=self.gpu_collect,
efficient_test=self.efficient_test)
if runner.rank == 0:
print('\n')
runner.log_buffer.output['eval_iter_num'] = len(self.dataloader)