MCPcopy Create free account
hub / github.com/UX-Decoder/Semantic-SAM / build_model

Method build_model

train_net.py:143–154  ·  view source on GitHub ↗

Returns: torch.nn.Module: It now calls :func:`detectron2.modeling.build_model`. Overwrite it if you'd like a different model.

(cls, cfg)

Source from the content-addressed store, hash-verified

141
142 @classmethod
143 def build_model(cls, cfg):
144 """
145 Returns:
146 torch.nn.Module:
147
148 It now calls :func:`detectron2.modeling.build_model`.
149 Overwrite it if you'd like a different model.
150 """
151 model = BaseModel(cfg, build_model(cfg)).cuda()
152 logger = logging.getLogger(__name__)
153 logger.info("Model:\n{}".format(model))
154 return model
155
156 @classmethod
157 def build_evaluator(cls, cfg, dataset_name, output_folder=None):

Callers 2

__init__Method · 0.95
mainFunction · 0.80

Calls 2

BaseModelClass · 0.90
build_modelFunction · 0.90

Tested by

no test coverage detected