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

Method _decollate_data

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

Source from the content-addressed store, hash-verified

201
202 @self.on(IterationEvents.MODEL_COMPLETED)
203 def _decollate_data(engine: Engine) -> None:
204 # replicate the scalar values to make sure all the items have batch dimension, then decollate
205 transform = Decollated(keys=None, detach=True)
206 if isinstance(engine.state.batch, (list, dict)):
207 engine.state.batch = transform(engine.state.batch)
208 if isinstance(engine.state.output, (list, dict)):
209 engine.state.output = transform(engine.state.output)
210
211 def _register_postprocessing(self, posttrans: Callable) -> None:
212 """

Callers

nothing calls this directly

Calls 1

DecollatedClass · 0.90

Tested by

no test coverage detected