basecls.models.build#
- basecls.models.build.build_model(cfg)[源代码]#
The factory function to build model.
备注
if
cfg.modeldoes not have the attrhead, this function will build model with the default head. Otherwise ifcfg.model.headisNone, this function will build model without any head.备注
if
cfg.model.headdoes not have the attrw_outandcfg.num_classesexists,w_outwill be overridden bycfg.num_classes.- 参数
cfg (
ConfigDict) – config for building model.- 返回类型
- 返回
A model.