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