[Fix] Fix after iter SegVisualizationHook (#1908)

* [Fix] Fix after iter `SegVisualizationHook`

* ut
This commit is contained in:
Miao Zheng 2022-08-10 21:02:09 +08:00 committed by GitHub
parent c498e6f593
commit 76c5ce1396
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 7 deletions

View File

@ -62,12 +62,12 @@ class SegVisualizationHook(Hook):
'effect. The results will NOT be '
'visualized or stored.')
def after_iter(self,
runner: Runner,
batch_idx: int,
data_batch: Sequence[dict],
outputs: Sequence[SegDataSample],
mode: str = 'val') -> None:
def _after_iter(self,
runner: Runner,
batch_idx: int,
data_batch: Sequence[dict],
outputs: Sequence[SegDataSample],
mode: str = 'val') -> None:
"""Run after every ``self.interval`` validation iterations.
Args:

View File

@ -59,4 +59,4 @@ class TestVisualizationHook(TestCase):
runner = Mock()
runner.iter = 3
hook = SegVisualizationHook(draw=True, interval=1)
hook.after_iter(runner, 1, self.data_batch, self.outputs)
hook.after_test_iter(runner, 1, self.data_batch, self.outputs)