def BiFPNLayers(num_filters, conv_channel_coef, fpn_cell_repeats, load_weights=False): bifpn = nn.Sequential(*[ BiFPN(num_filters, conv_channel_coef, True if _ == 0 else False, attention=True) for _ in range(fpn_cell_repeats) ]) if load_weights: load_pretrained_weights(bifpn, 'efficientnet-b6', load_bifpn=load_weights) return bifpn
def init_backbone(self, path): load_pretrained_weights(self, 'efficientnet-b6', weights_path=path, load_fc=False, advprop=False)
def init_backbone(self, path): load_pretrained_weights(self.backbone_net, self.model_name)