MCPcopy Create free account
hub / github.com/Project-MONAI/MONAI / _run_postprocessing

Method _run_postprocessing

monai/engines/workflow.py:218–225  ·  view source on GitHub ↗
(engine: Engine)

Source from the content-addressed store, hash-verified

216
217 @self.on(IterationEvents.MODEL_COMPLETED)
218 def _run_postprocessing(engine: Engine) -> None:
219 if not isinstance(engine.state.batch, list) or not isinstance(engine.state.output, list):
220 engine.state.batch, engine.state.output = engine_apply_transform(
221 batch=engine.state.batch, output=engine.state.output, transform=posttrans
222 )
223 else:
224 for i, (b, o) in enumerate(zip(engine.state.batch, engine.state.output)):
225 engine.state.batch[i], engine.state.output[i] = engine_apply_transform(b, o, posttrans)
226
227 def _register_metrics(self, k_metric: dict, add_metrics: dict | None = None) -> None:
228 """

Callers

nothing calls this directly

Calls 1

engine_apply_transformFunction · 0.85

Tested by

no test coverage detected