Remove pointless densenet configs, add an iabn version of 264 as it makes more sense to try someday...

pull/155/head
Ross Wightman 5 years ago
parent e78daf586a
commit a7e8cadd15

@ -39,6 +39,7 @@ default_cfgs = {
'densenet201': _cfg(url='https://download.pytorch.org/models/densenet201-c1103571.pth'), 'densenet201': _cfg(url='https://download.pytorch.org/models/densenet201-c1103571.pth'),
'densenet161': _cfg(url='https://download.pytorch.org/models/densenet161-8d451a50.pth'), 'densenet161': _cfg(url='https://download.pytorch.org/models/densenet161-8d451a50.pth'),
'densenet264': _cfg(url=''), 'densenet264': _cfg(url=''),
'densenet264d_iabn': _cfg(url=''),
'tv_densenet121': _cfg(url='https://download.pytorch.org/models/densenet121-a639ec97.pth'), 'tv_densenet121': _cfg(url='https://download.pytorch.org/models/densenet121-a639ec97.pth'),
} }
@ -331,45 +332,6 @@ def densenet121d(pretrained=False, **kwargs):
return model return model
@register_model
def densenet121d_evob(pretrained=False, **kwargs):
r"""Densenet-121 model from
`"Densely Connected Convolutional Networks" <https://arxiv.org/pdf/1608.06993.pdf>`
"""
def norm_act_fn(num_features, **kwargs):
return create_norm_act('EvoNormBatch', num_features, jit=True, **kwargs)
model = _densenet(
'densenet121d', growth_rate=32, block_config=(6, 12, 24, 16), stem_type='deep',
norm_layer=norm_act_fn, pretrained=pretrained, **kwargs)
return model
@register_model
def densenet121d_evos(pretrained=False, **kwargs):
r"""Densenet-121 model from
`"Densely Connected Convolutional Networks" <https://arxiv.org/pdf/1608.06993.pdf>`
"""
def norm_act_fn(num_features, **kwargs):
return create_norm_act('EvoNormSample', num_features, jit=True, **kwargs)
model = _densenet(
'densenet121d', growth_rate=32, block_config=(6, 12, 24, 16), stem_type='deep',
norm_layer=norm_act_fn, pretrained=pretrained, **kwargs)
return model
@register_model
def densenet121d_iabn(pretrained=False, **kwargs):
r"""Densenet-121 model from
`"Densely Connected Convolutional Networks" <https://arxiv.org/pdf/1608.06993.pdf>`
"""
def norm_act_fn(num_features, **kwargs):
return create_norm_act('iabn', num_features, **kwargs)
model = _densenet(
'densenet121tn', growth_rate=32, block_config=(6, 12, 24, 16), stem_type='deep',
norm_layer=norm_act_fn, pretrained=pretrained, **kwargs)
return model
@register_model @register_model
def densenet169(pretrained=False, **kwargs): def densenet169(pretrained=False, **kwargs):
r"""Densenet-169 model from r"""Densenet-169 model from
@ -410,6 +372,18 @@ def densenet264(pretrained=False, **kwargs):
return model return model
@register_model
def densenet264d_iabn(pretrained=False, **kwargs):
r"""Densenet-264 model with deep stem and Inplace-ABN
"""
def norm_act_fn(num_features, **kwargs):
return create_norm_act('iabn', num_features, **kwargs)
model = _densenet(
'densenet264d_iabn', growth_rate=48, block_config=(6, 12, 64, 48), stem_type='deep',
norm_layer=norm_act_fn, pretrained=pretrained, **kwargs)
return model
@register_model @register_model
def tv_densenet121(pretrained=False, **kwargs): def tv_densenet121(pretrained=False, **kwargs):
r"""Densenet-121 model with original Torchvision weights, from r"""Densenet-121 model with original Torchvision weights, from

Loading…
Cancel
Save