分类:SENet
我就废话不多说了,大家还是直接看代码吧~fromtorchimportnnclassSELayer(nn.Module):def__init__(self,channel,reduction=16):super(SELayer,self).__init__()//返回1X1大小的特征图,通道数不变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),...
继续阅读 >