Shortcuts

mmpretrain.models.builder 源代码

# Copyright (c) OpenMMLab. All rights reserved.
from mmpretrain.registry import MODELS

BACKBONES = MODELS
NECKS = MODELS
HEADS = MODELS
LOSSES = MODELS
CLASSIFIERS = MODELS
RETRIEVER = MODELS


[文档]def build_backbone(cfg): """Build backbone.""" return BACKBONES.build(cfg)
[文档]def build_neck(cfg): """Build neck.""" return NECKS.build(cfg)
[文档]def build_head(cfg): """Build head.""" return HEADS.build(cfg)
[文档]def build_loss(cfg): """Build loss.""" return LOSSES.build(cfg)
[文档]def build_classifier(cfg): """Build classifier.""" return CLASSIFIERS.build(cfg)
def build_retriever(cfg): """Build retriever.""" return RETRIEVER.build(cfg)
Read the Docs v: dev
Versions
latest
stable
mmcls-1.x
mmcls-0.x
dev
Downloads
epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.