(opt)
| 186 | |
| 187 | |
| 188 | def 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 |
no outgoing calls
no test coverage detected