Beispiel #1
0
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
Beispiel #2
0
 def init_backbone(self, path):
     load_pretrained_weights(self,
                             'efficientnet-b6',
                             weights_path=path,
                             load_fc=False,
                             advprop=False)
Beispiel #3
0
 def init_backbone(self, path):
     load_pretrained_weights(self.backbone_net, self.model_name)