Shortcuts

GenLogProcessor

class mmedit.engine.runner.GenLogProcessor(window_size=10, by_epoch=True, custom_cfg: Optional[List[dict]] = None, num_digits: int = 4)[source]

GenLogProcessor inherits from :class:~mmengine.logging.LogProcessor and overwrites :meth:self.get_log_after_iter.

This log processor should be used along with :class:mmedit.engine.runners.loops.GenValLoop and :class:mmedit.engine.runners.loops.GenTestLoop.

get_log_after_epoch(runner, batch_idx: int, mode: str) Tuple[dict, str][source]

Format log string after validation or testing epoch.

We use runner.val_loop.total_length and runner.test_loop.total_length as the total number of iterations shown in log. If you want to know how total_length is calculated, please refers to :meth:mmgen.core.runners.loops.GenValLoop.run and :meth:mmgen.core.runners.loops.GenTestLoop.run.

Parameters
  • runner (Runner) – The runner of validation/testing phase.

  • batch_idx (int) – The index of the current batch in the current loop.

  • mode (str) – Current mode of runner.

Returns

Formatted log dict/string which will be recorded by runner.message_hub and runner.visualizer.

Return type

Tuple(dict, str)

get_log_after_iter(runner, batch_idx: int, mode: str) Tuple[dict, str][source]

Format log string after training, validation or testing epoch.

If mode is in ‘val’ or ‘test’, we use runner.val_loop.total_length and runner.test_loop.total_length as the total number of iterations shown in log. If you want to know how total_length is calculated, please refers to :meth:mmedit.engine.runners.loops.GenValLoop.run and :meth:mmedit.engien.runners.loops.GenTestLoop.run.

Parameters
  • runner (Runner) – The runner of training phase.

  • batch_idx (int) – The index of the current batch in the current loop.

  • mode (str) – Current mode of runner, train, test or val.

Returns

Formatted log dict/string which will be

recorded by runner.message_hub and runner.visualizer.

Return type

Tuple(dict, str)

Read the Docs v: zyh/doc-notfound-extend
Versions
master
latest
stable
zyh-doc-notfound-extend
Downloads
pdf
html
epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.