Safemotion Lib
Loading...
Searching...
No Matches
Functions | Variables
fastreid.modeling.meta_arch.build Namespace Reference

Functions

 build_model (cfg, device=None)
 

Variables

 META_ARCH_REGISTRY = Registry("META_ARCH")
 

Detailed Description

@author:  liaoxingyu
@contact: sherlockliao01@gmail.com

Function Documentation

◆ build_model()

fastreid.modeling.meta_arch.build.build_model ( cfg,
device = None )
Build the whole model architecture, defined by ``cfg.MODEL.META_ARCHITECTURE``.
Note that it does not load any weights from ``cfg``.

Definition at line 18 of file build.py.

18def build_model(cfg, device=None):
19 """
20 Build the whole model architecture, defined by ``cfg.MODEL.META_ARCHITECTURE``.
21 Note that it does not load any weights from ``cfg``.
22 """
23 meta_arch = cfg.MODEL.META_ARCHITECTURE
24 model = META_ARCH_REGISTRY.get(meta_arch)(cfg)
25 model.to(torch.device(cfg.MODEL.DEVICE))
26 return model

Variable Documentation

◆ META_ARCH_REGISTRY

fastreid.modeling.meta_arch.build.META_ARCH_REGISTRY = Registry("META_ARCH")

Definition at line 10 of file build.py.