EpochOutputStore¶
-
class
ignite.contrib.handlers.stores.
EpochOutputStore
(output_transform=<function EpochOutputStore.<lambda>>)[source]¶ EpochOutputStore handler to save output prediction and target history after every epoch, could be useful for e.g., visualization purposes.
Note
This can potentially lead to a memory error if the output data is larger than available RAM.
- Parameters
output_transform (Callable) – a callable that is used to transform the
Engine
’sprocess_function
’s output , e.g., lambda x: x[0]
Examples:
eos = EpochOutputStore() trainer = create_supervised_trainer(model, optimizer, loss) train_evaluator = create_supervised_evaluator(model, metrics) eos.attach(train_evaluator) @trainer.on(Events.EPOCH_COMPLETED) def log_training_results(engine): train_evaluator.run(train_loader) output = eos.data # do something with output, e.g., plotting
New in version 0.4.2.
Methods
Attaching reset method at EPOCH_STARTED and update method at ITERATION_COMPLETED.
Reset the attribute data to empty list.
Append the output of Engine to attribute data.
-
attach
(engine)[source]¶ Attaching reset method at EPOCH_STARTED and update method at ITERATION_COMPLETED.
- Parameters
engine (ignite.engine.engine.Engine) –
- Return type
-
update
(engine)[source]¶ Append the output of Engine to attribute data.
- Parameters
engine (ignite.engine.engine.Engine) –
- Return type