def __init__(self, cfg): super(RepVGG, self).__init__() self.backbone = build_backbone(cfg) self.head = build_head(cfg) zcls_pretrained = cfg.MODEL.RECOGNIZER.PRETRAINED pretrained_num_classes = cfg.MODEL.RECOGNIZER.PRETRAINED_NUM_CLASSES num_classes = cfg.MODEL.HEAD.NUM_CLASSES self.init_weights(zcls_pretrained, pretrained_num_classes, num_classes)
def __init__(self, cfg): super(ShuffleNetV1, self).__init__() self.fix_bn = cfg.MODEL.NORM.FIX_BN self.partial_bn = cfg.MODEL.NORM.PARTIAL_BN self.backbone = build_backbone(cfg) self.head = build_head(cfg) zcls_pretrained = cfg.MODEL.RECOGNIZER.PRETRAINED pretrained_num_classes = cfg.MODEL.RECOGNIZER.PRETRAINED_NUM_CLASSES num_classes = cfg.MODEL.HEAD.NUM_CLASSES self.init_weights(zcls_pretrained, pretrained_num_classes, num_classes)