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

Function build_segmentor

mmseg/models/builder.py:38–46  ·  view source on GitHub ↗

Build segmentor.

(cfg, train_cfg=None, test_cfg=None)

Source from the content-addressed store, hash-verified

36
37
38def build_segmentor(cfg, train_cfg=None, test_cfg=None):
39 """Build segmentor."""
40 if train_cfg is not None or test_cfg is not None:
41 warnings.warn("train_cfg and test_cfg is deprecated, please specify them in model", UserWarning)
42 assert cfg.get("train_cfg") is None or train_cfg is None, (
43 "train_cfg specified in both outer field and model field "
44 )
45 assert cfg.get("test_cfg") is None or test_cfg is None, "test_cfg specified in both outer field and model field "
46 return SEGMENTORS.build(cfg, default_args=dict(train_cfg=train_cfg, test_cfg=test_cfg))

Callers 1

init_segmentorFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected