SENet paper

Squeeze-and-Excitation Networks

CNN is the most important operation of convolution, convolution operation may extract the local receptive field (local receptive field) spatial information of each layer and the channel. Prior research focused on acquiring spatial information, this thesis work focused on information between the channels. OF proposed Squeeze-andExcitation (SE) module, which can be re-calibrated passage between the right weight, may be added, such as the module resnet the like, smaller than in the existing additional computational network, and achieved good results, obtaining ImageNet2017 the championship classification task.

SENet network structure

SEBlock
SE Block and contains two portions Sequeeze Excitation:

  • Squeeze: for The ( C × H × W ) U(C\times H \times W) be global pooling, get 1 × 1 × C 1 \times 1 \times C wherein FIG size, these features can be considered to have global FIG receptive fields.
  • Excitation: full mesh layer, and the results after Sequeeze make a nonlinear transformation. In order to completely capture the purpose of correlation between the channels.
  • Re-calibration feature, as a result of using Excitation weight multiplied to the input feature.
    2 below shows an example of SE Block application, and the left Inception binding, binding to the right ResNet.
    SE-Inception and SE-ResNet

Code

from torch import nn
import torch
class SEBlock(nn.Module):
	def __init__(self,channel, r=16):
		super(SEBlock, self).__init__()
		self.avg_pool = nn.AdaptiveAvgPool2d(1)
		self.fc=nn.Sequential(
			nn.Linear(channel, channel//r, bias=False),
			nn.ReLU(inplace=True),
			nn.Linear(channel//r, channel, bias=False),
			nn.Sigmoid(),
			)

	def forward(self, x):
		b, c, _, _ = x.size()
		#Squeeze
		y = self.avg_pool(x).view(b,c)  # Squeeze 操作
		#Excitation
		y = self.fc(y).view(b,c,1,1)   # Excitation操作
		#Fscale
		y = torch.mul(x,y) #x与y维度不同,这里体现了python的广播机制
		return y


model

The following figure shows ResNet-50, SE-ResNet-50, SE-ResNeXt-50 network structure, we can see from the figure, SEBlock added in the back of each convolution block, i.e. two FC, brackets which is the number of each layer neural element.
Model structure

experiment

In the experimental part of the paper verified on different sets of data, at different depths in the network, has significantly enhance the effect. And separately validate the role Squeeze portion Excitation and specific experimental section refer to the paper .

to sum up

Papers presented SE Block aims to channel the right to use the weight adjustment feature to improve the representation capability of the network.

References

1. Squeeze-and-Excitation Networks
2. After ResNet era: SENet and SKNet

Published 93 original articles · won praise 0 · views 20000 +

Guess you like

Origin blog.csdn.net/Dream_xd/article/details/104494974