MCPcopy Create free account
hub / github.com/VCIP-RGBD/DFormer / build_optimizer_constructor

Function build_optimizer_constructor

mmseg/core/builder.py:10–17  ·  view source on GitHub ↗
(cfg)

Source from the content-addressed store, hash-verified

8
9
10def build_optimizer_constructor(cfg):
11 constructor_type = cfg.get("type")
12 if constructor_type in OPTIMIZER_BUILDERS:
13 return build_from_cfg(cfg, OPTIMIZER_BUILDERS)
14 elif constructor_type in MMCV_OPTIMIZER_BUILDERS:
15 return build_from_cfg(cfg, MMCV_OPTIMIZER_BUILDERS)
16 else:
17 raise KeyError(f"{constructor_type} is not registered in the optimizer builder registry.")
18
19
20def build_optimizer(model, cfg):

Callers 1

build_optimizerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected