| 193 | |
| 194 | @MODELS.register_module() |
| 195 | class SimpleClassificationDF(Module): |
| 196 | def __init__(self, cfg: dict, **kwargs): |
| 197 | super(SimpleClassificationDF, self).__init__() |
| 198 | assert 'backbone' in cfg, 'Config for Backbones is mandatory!' |
| 199 | assert 'head' in cfg, 'Config for Heads is mandatory!' |
| 200 | |
| 201 | self.backbone = BACKBONES.get(cfg.backbone.type)(**cfg.backbone) |
| 202 | self.head = HEADS.get(cfg.head.type)(**cfg.head) |
| 203 | self.model = Sequential(*[self.backbone, |
| 204 | self.head]) |
| 205 | |
| 206 | def forward(self, x): |
| 207 | x = self.model(x) |
| 208 | return x |
| 209 | |
| 210 | |
| 211 | ################################## MobileFaceNet ############################################################# |
nothing calls this directly
no outgoing calls
no test coverage detected