ParamSchedulerHook — mmengine 0.10.7 documentation (original) (raw)

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:

Return type:

None

after_val_epoch(runner, metrics=None)[source]

Call step function for each scheduler which has attributeneed_val_args after each validation epoch.

Parameters:

Return type:

None

Note

if runner.param_schedulers is not built before, the hook after_val_epoch will be skipped.