ParamSchedulerHook¶
- class mmengine.hooks.ParamSchedulerHook[源代码]¶
A hook to update some hyper-parameters in optimizer, e.g., learning rate and momentum.
- after_train_epoch(runner)[源代码]¶
Call step function for each scheduler after each training epoch.
- 参数:
runner (Runner) – The runner of the training process.
- 返回类型:
None
- 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.
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.
- 返回类型:
None