Fix pool size in cspnet

pull/175/head
Ross Wightman 4 years ago
parent 14ef7a0dd6
commit a69c0e04f0

@ -10,7 +10,7 @@ Based on paper `CSPNet: A New Backbone that can Enhance Learning Capability of C
Reference impl via darknet cfg files at https://github.com/WongKinYiu/CrossStagePartialNetworks Reference impl via darknet cfg files at https://github.com/WongKinYiu/CrossStagePartialNetworks
Hacked together by Ross Wightman Hacked together by / Copyright 2020 Ross Wightman
""" """
import torch import torch
import torch.nn as nn import torch.nn as nn
@ -28,7 +28,7 @@ __all__ = ['CspNet'] # model_registry will add each entrypoint fn to this
def _cfg(url='', **kwargs): def _cfg(url='', **kwargs):
return { return {
'url': url, 'url': url,
'num_classes': 1000, 'input_size': (3, 256, 256), 'pool_size': (7, 7), 'num_classes': 1000, 'input_size': (3, 256, 256), 'pool_size': (8, 8),
'crop_pct': 0.887, 'interpolation': 'bilinear', 'crop_pct': 0.887, 'interpolation': 'bilinear',
'mean': IMAGENET_DEFAULT_MEAN, 'std': IMAGENET_DEFAULT_STD, 'mean': IMAGENET_DEFAULT_MEAN, 'std': IMAGENET_DEFAULT_STD,
'first_conv': 'stem.conv1.conv', 'classifier': 'head.fc', 'first_conv': 'stem.conv1.conv', 'classifier': 'head.fc',
@ -42,7 +42,7 @@ default_cfgs = {
'cspresnet50w': _cfg(url=''), 'cspresnet50w': _cfg(url=''),
'cspresnext50': _cfg( 'cspresnext50': _cfg(
url='https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-weights/cspresnext50_ra_224-648b4713.pth', url='https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-weights/cspresnext50_ra_224-648b4713.pth',
input_size=(3, 224, 224), crop_pct=0.875 # FIXME I trained this at 224x224, not 256 like ref impl input_size=(3, 224, 224), pool_size=(7, 7), crop_pct=0.875 # FIXME I trained this at 224x224, not 256 like ref impl
), ),
'cspresnext50_iabn': _cfg(url=''), 'cspresnext50_iabn': _cfg(url=''),
'cspdarknet53': _cfg( 'cspdarknet53': _cfg(

Loading…
Cancel
Save