MCPcopy Create free account
hub / github.com/DragonisCV/RAM / build_model

Function build_model

ram/models/__init__.py:18–29  ·  view source on GitHub ↗

Build model from options. Args: opt (dict): Configuration. It must contain: model_type (str): Model type.

(opt)

Source from the content-addressed store, hash-verified

16
17
18def build_model(opt):
19 """Build model from options.
20
21 Args:
22 opt (dict): Configuration. It must contain:
23 model_type (str): Model type.
24 """
25 opt = deepcopy(opt)
26 model = MODEL_REGISTRY.get(opt['model_type'])(opt)
27 logger = get_root_logger()
28 logger.info(f'Model [{model.__class__.__name__}] is created.')
29 return model

Callers 2

train_pipelineFunction · 0.90
test_pipelineFunction · 0.90

Calls 2

get_root_loggerFunction · 0.90
getMethod · 0.45

Tested by 1

test_pipelineFunction · 0.72