mirror of
https://github.com/open-mmlab/mmsegmentation.git
synced 2025-06-03 22:03:48 +08:00
[Fix] Fix after iter SegVisualizationHook
(#1908)
* [Fix] Fix after iter `SegVisualizationHook` * ut
This commit is contained in:
parent
c498e6f593
commit
76c5ce1396
@ -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:
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user