|
|
@ -409,7 +409,7 @@ class CspNet(nn.Module):
|
|
|
|
def _create_cspnet(variant, pretrained=False, **kwargs):
|
|
|
|
def _create_cspnet(variant, pretrained=False, **kwargs):
|
|
|
|
cfg_variant = variant.split('_')[0]
|
|
|
|
cfg_variant = variant.split('_')[0]
|
|
|
|
# NOTE: DarkNet is one of few models with stride==1 features w/ 6 out_indices [0..5]
|
|
|
|
# NOTE: DarkNet is one of few models with stride==1 features w/ 6 out_indices [0..5]
|
|
|
|
out_indices = kwargs.get('out_indices', (0, 1, 2, 3, 4, 5) if 'darknet' in variant else (0, 1, 2, 3, 4))
|
|
|
|
out_indices = kwargs.pop('out_indices', (0, 1, 2, 3, 4, 5) if 'darknet' in variant else (0, 1, 2, 3, 4))
|
|
|
|
return build_model_with_cfg(
|
|
|
|
return build_model_with_cfg(
|
|
|
|
CspNet, variant, pretrained,
|
|
|
|
CspNet, variant, pretrained,
|
|
|
|
default_cfg=default_cfgs[variant],
|
|
|
|
default_cfg=default_cfgs[variant],
|
|
|
|