, target_func)[source]

Returns a trainer extension to continuously record a value.

  • observation_key (str) – Key of observation to record.

  • target_func (function) – Function that returns the value to record. It must take one argument: object.


The extension function.

This extension is triggered each epoch by default. To change this, use the trigger argument with the Trainer.extend() method.