chainer.training.extensions.observe_value

chainer.training.extensions.observe_value(observation_key, target_func)[source]

Returns a trainer extension to continuously record a value.

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

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

Returns

The extension function.

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