Shortcuts

mmengine.registry.build_scheduler_from_cfg

mmengine.registry.build_scheduler_from_cfg(cfg, registry, default_args=None)[source]

Builds a ParamScheduler instance from config.

ParamScheduler supports building instance by its constructor or method build_iter_from_epoch. Therefore, its registry needs a build function to handle both cases.

Parameters:
  • cfg (dict or ConfigDict or Config) – Config dictionary. If it contains the key convert_to_iter_based, instance will be built by method convert_to_iter_based, otherwise instance will be built by its constructor.

  • registry (Registry) – The PARAM_SCHEDULERS registry.

  • default_args (dict or ConfigDict or Config, optional) – Default initialization arguments. It must contain key optimizer. If convert_to_iter_based is defined in cfg, it must additionally contain key epoch_length. Defaults to None.

Returns:

The constructed ParamScheduler.

Return type:

object

Read the Docs v: stable
Versions
latest
stable
v0.10.5
v0.10.4
v0.10.3
v0.10.2
v0.10.1
v0.10.0
v0.9.1
v0.9.0
v0.8.5
v0.8.4
v0.8.3
v0.8.2
v0.8.1
v0.8.0
v0.7.4
v0.7.3
v0.7.2
v0.7.1
v0.7.0
v0.6.0
v0.5.0
v0.4.0
v0.3.0
v0.2.0
Downloads
epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.