|
|
@ -14,7 +14,7 @@ import torch.nn.functional as F
|
|
|
|
from .registry import register_model
|
|
|
|
from .registry import register_model
|
|
|
|
from .helpers import load_pretrained
|
|
|
|
from .helpers import load_pretrained
|
|
|
|
from .adaptive_avgmax_pool import SelectAdaptivePool2d
|
|
|
|
from .adaptive_avgmax_pool import SelectAdaptivePool2d
|
|
|
|
from .EcaModule import EcaModule
|
|
|
|
from .layers import EcaModule
|
|
|
|
from timm.data import IMAGENET_DEFAULT_MEAN, IMAGENET_DEFAULT_STD
|
|
|
|
from timm.data import IMAGENET_DEFAULT_MEAN, IMAGENET_DEFAULT_STD
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -212,7 +212,7 @@ class Bottleneck(nn.Module):
|
|
|
|
self.bn3 = norm_layer(outplanes)
|
|
|
|
self.bn3 = norm_layer(outplanes)
|
|
|
|
|
|
|
|
|
|
|
|
self.se = SEModule(outplanes, planes // 4) if use_se else None
|
|
|
|
self.se = SEModule(outplanes, planes // 4) if use_se else None
|
|
|
|
self.eca = Eca_Module(outplanes) if use_eca else None
|
|
|
|
self.eca = EcaModule(outplanes) if use_eca else None
|
|
|
|
|
|
|
|
|
|
|
|
self.act3 = act_layer(inplace=True)
|
|
|
|
self.act3 = act_layer(inplace=True)
|
|
|
|
self.downsample = downsample
|
|
|
|
self.downsample = downsample
|
|
|
|