- class mmengine.hooks.ParamSchedulerHook¶
A hook to update some hyper-parameters in optimizer, e.g., learning rate and momentum.
Call step function for each scheduler after each training epoch.
- after_train_iter(runner, batch_idx, data_batch=None, outputs=None)¶
Call step function for each scheduler after each training iteration.
runner (Runner) – The runner of the training process.
batch_idx (int) – The index of the current batch in the train loop.
outputs (dict, optional) – Outputs from model. In order to keep this interface consistent with other hooks, we keep
- after_val_epoch(runner, metrics=None)¶
Call step function for each scheduler which has attribute
need_val_argsafter each validation epoch.
runner.param_schedulersis not built before, the hook
after_val_epochwill be skipped.