全局平均池

全连接层上的全局平均池的一个优点是,通过强制特征映射和类别之间的对应,它对卷积结构更加本地化。因此,特征图可以容易地解释为类别置信度图。另一个优点是在全局平均池中没有优化参数,因此在该层避免过度拟合。

没什么好处,只是比fc参数少。cv里面不如一直卷积,nlp里面不如用rnn

最新的网络中通常都是最后一个全局平均池化加一个全连接
至于原因,一是主流模型采用此种方法确实提升了精度(当然不仅这个改变,没有做对比实验不好下结论)。二是LeCun还是Bengio大神说过这俩效果一样。

1,如果分类的确要使用全fc的话,fc的size可以根据具体任务调整。一般层数为2层( fc_size-label_size),,第一层保持较高通道数(512或1024),第二层就按最终的类别数输出(10,21,81,1000.....)。imagenet级别任务一般fc_size为4096级别,并且配合dropout使用,mnist任务级别一般fc_size 512左右,依次类推。
2,目前分类任务中,主流网络结构都抛弃了fc,原因有两个: 参数太多; cpu实现起来实际gflops很低。用global avg+1*1 conv(这时候相当于fc)代替。

3.2 Global Average Pooling Conventional convolutional neural networks perform convolution in the lower layers of the network. For classification, the feature maps of the last convolutional layer are vectorized and fed into fully connected layers followed by a softmax logistic regression layer [4] [8] [11]. This structure bridges the convolutional structure with traditional neural network classifiers. It treats the convolutional layers as feature extractors, and the resulting feature is classified in a traditional way. However, the fully connected layers are prone to overfitting, thus hampering the generalization ability of the overall network. Dropout is proposed by Hinton et al. [5] as a regularizer which randomly sets half of the activations to the fully connected layers to zero during training. It has improved the generalization ability and largely prevents overfitting [4]. In this paper, we propose another strategy called global average pooling to replace the traditional fully connected layers in CNN. The idea is to generate one feature map for each corresponding category of the classification task in the last mlpconv layer. Instead of adding fully connected layers on top of the feature maps, we take the average of each feature map, and the resulting vector is fed directly into the softmax layer. One advantage of global average pooling over the fully connected layers is that it is more native to the convolution structure by enforcing correspondences between feature maps and categories. Thus the feature maps can be easily interpreted as categories confidence maps. Another advantage is that there is no parameter to optimize in the global average pooling thus overfitting is avoided at this layer. Futhermore, global average pooling sums out the spatial information, thus it is more robust to spatial translations of the input. We can see global average pooling as a structural regularizer that explicitly enforces feature maps to be confidence maps of concepts (categories). This is made possible by the mlpconv layers, as they makes better approximation to the confidence maps than GLMs.

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章