SE-Net
class SELayer(nn.Module):
def __init__(self, channel, reduction=16):
super(SELayer, self).__init__()
self.avg_pool = nn.AdaptiveAvgPool2d(1)
self.fc = nn.Sequential(
nn.Linear(channel, channel // reduction, bias=False),
nn.ReLU(inplace=True),
nn.Linear(channel // reduction, channel, bias=False),
nn.Sigmoid()
)
def forward(self, x):
b, c, _, _ = x.size()
y = self.avg_pool(x).view(b, c)
y = self.fc(y).view(b, c, 1, 1)
return x * y.expand_as(x)
QA
-
fast
版本和普通版本的區(qū)別:
fast版本的下采樣在3x3卷積前厦取,從而減少計算量家夺。二者差異在0.5%左右趁蕊。
- 什么是
3x learning schedule
Most models are trained with the 3x schedule (~37 COCO epochs). Although 1x models are heavily under-trained, we provide some ResNet-50 models with the 1x (~12 COCO epochs) training schedule for comparison when doing quick research iteration.(摘自
Detectron2
)
總結(jié)
在Block里面集成了SE
和Multi_path
的思想萧朝,新構(gòu)成的網(wǎng)絡(luò)效果較好腊尚,且在下流任務(wù)中表現(xiàn)很好略荡。其中結(jié)構(gòu)的改變提升了大概1.6%庵佣,其他的增強是由訓(xùn)練方法提升的。整體效果較好汛兜,需要在自己的數(shù)據(jù)集上進(jìn)行評估巴粪。簡單看了一下官方開源的代碼,其pytorch
版本還沒有完全寫完(比如drop block
)粥谬,且是直接在resnet
基礎(chǔ)上改的肛根,mxnet
寫得比較完善。后續(xù)先在自己的數(shù)據(jù)集上進(jìn)行測試漏策,如果效果較好的話派哲,再移植到tensorflow
中去實現(xiàn)。