def res2net101_26w_4s(pretrained=False, strides=(2, 2, 2, 1, 1), inter_features=False): model = Res2Net(Bottle2neck, [3, 4, 23, 3], strides=strides, inter_features=inter_features, baseWidth=26, scale=4) if pretrained: pretrained_state = network_utils.flex_load(model.state_dict(), model_zoo.load_url(model_urls['res2net101_26w_4s']), verb=False) model.load_state_dict(pretrained_state, strict=False) return model
def wide_resnet101_2(pretrained=False, strides=(2, 2, 2, 1, 1), inter_features=False): model = ResNet(Bottleneck, [3, 4, 23, 3], strides=strides, inter_features=inter_features, width_per_group=64*2) if pretrained: pretrained_state = network_utils.flex_load(model.state_dict(), model_zoo.load_url(model_urls['wide_resnet101_2']), verb=False) model.load_state_dict(pretrained_state, strict=False) return model
def resnet152(pretrained=True, strides=(2, 2, 2, 1, 1), inter_features=False): model = ResNet(Bottleneck, [3, 8, 36, 3], strides=strides, inter_features=inter_features) if pretrained: pretrained_state = network_utils.flex_load(model.state_dict(), model_zoo.load_url(model_urls['resnet152']), verb=False) model.load_state_dict(pretrained_state, strict=False) return model
def resnext50_32x4d(pretrained=False, strides=(2, 2, 2, 1, 1), inter_features=False): model = ResNet(Bottleneck, [3, 4, 6, 3], strides=strides, inter_features=inter_features, groups=32, width_per_group=4) if pretrained: pretrained_state = network_utils.flex_load(model.state_dict(), model_zoo.load_url(model_urls['resnext50_32x4d']), verb=False) model.load_state_dict(pretrained_state, strict=False) return model
def resnet34(pretrained=True, strides=(2, 2, 2, 1, 1), inter_features=False): model = ResNet(BasicBlock, [3, 4, 6, 3], strides=strides, inter_features=inter_features) if pretrained: pretrained_state = network_utils.flex_load( model.state_dict(), model_zoo.load_url(model_urls['resnet34'])) model.load_state_dict(pretrained_state, strict=False) return model