pytorch_pfn_extras.training.extensions.observe_lr#
- pytorch_pfn_extras.training.extensions.observe_lr(optimizer, param_group=0, observation_key='lr')#
Returns an extension to record the learning rate.
- Parameters:
optimizer (Optimizer) – Optimizer whose learning rate is recorded.
param_group (int) – Param group of the optimizer to observe
observation_key (str) – Key of observation to record.
- Returns:
The extension function.
- Return type:
Any
This extension is triggered each epoch by default. To change this, use the
trigger
argument with theExtensionsManager.extend()
method.