ParamSchedulerHook¶
- class mmengine.hooks.ParamSchedulerHook[source]¶
A hook to update some hyper-parameters in optimizer, e.g., learning rate and momentum.
- after_train_epoch(runner)[source]¶
Call step function for each scheduler after each training epoch.
- Parameters:
runner (Runner) – The runner of the training process.
- Return type:
None
- after_train_iter(runner, batch_idx, data_batch=None, outputs=None)[source]¶
Call step function for each scheduler after each training iteration.
- Parameters:
runner (Runner) – The runner of the training process.
batch_idx (int) – The index of the current batch in the train loop.
data_batch (dict or tuple or list, optional) – Data from dataloader. In order to keep this interface consistent with other hooks, we keep
data_batch
here.outputs (dict, optional) – Outputs from model. In order to keep this interface consistent with other hooks, we keep
data_batch
here.
- Return type:
None