MCPcopy Create free account
hub / github.com/HobbitLong/PyContrast / build_model

Function build_model

pycontrast/networks/build_backbone.py:188–199  ·  view source on GitHub ↗
(opt)

Source from the content-addressed store, hash-verified

186
187
188def build_model(opt):
189 # specify modal key
190 branch = 'Mul' if opt.jigsaw else 'Sin'
191 model_key = opt.modal + branch
192
193 model = NAME_TO_FUNC[model_key](opt.arch, opt.head, opt.feat_dim)
194 if opt.mem == 'moco':
195 model_ema = NAME_TO_FUNC[model_key](opt.arch, opt.head, opt.feat_dim)
196 else:
197 model_ema = None
198
199 return model, model_ema

Callers 2

main_workerFunction · 0.90
main_workerFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected