common.utils

Please Reference ding/ding/docs/source/api_doc/model/common/utils.py for usage

create_model

ding.model.common.utils.create_model(cfg: easydict.EasyDict)torch.nn.modules.module.Module[source]
Overview:

Creat model given config dictionary

Arguments:
  • cfg: (dict):

    The trainning configuration, the key import_name is used to import module, and they key type is used to build model.

Returns:
  • (torch.nn.Module) The corresponding model.