Esempio n. 1
0
def l_resnext101(pretrained, baseWidth, cardinality):
    """
    Construct ResNeXt-101.
    """
    model = ResNeXt(baseWidth, cardinality, [3, 4, 23, 3], 1000)
    if pretrained:
        L.load_pretrained_params(model, model_url=model_urls["resnext101"])
    return model
Esempio n. 2
0
def l_resnet101(pretrained=False, **kwargs):
    """Constructs a ResNet-101 model.
    Args:
        pretrained (bool): If True, returns a model pre-trained on ImageNet
    """
    model = ResNet(Bottleneck, [3, 4, 23, 3], **kwargs)
    if pretrained:
        L.load_pretrained_params(model, model_url=model_urls["resnet101"])
    return model