Skip to main content
This is a very high level view of practical structures of CNNs before the advent of more innovative architectures such as ResNets.

Toy CNN Network

convnet The example CNN architecture above has the following layers:
  • INPUT [32x32x3] will hold the raw pixel values of the image, in this case an image of width 32, height 32, and with three color channels R,G,B.
  • CONV layer will compute the output of neurons that are connected to local regions in the input, each computing a dot product between their weights and a small region they are connected to in the input volume. This may result in volume such as [32x32x12] if we decided to use 12 filters.
  • RELU layer will apply an element-wise ReLU activation function. This leaves the size of the volume unchanged ([32x32x12]).
  • POOL layer will perform a downsampling operation along the spatial dimensions (width, height), resulting in volume such as [16x16x12].
  • FC (i.e. fully-connected) layer, also known as a dense layer, will compute the class scores, resulting in volume of size [1x1x10], where each of the 10 numbers correspond to a class score, such as among the 10 categories of the CIFAR-10 dataset that we are showing here.

VGG Networks

The VGG networks from Oxford were the first to use much smaller 3×3 filters in each convolution layer. They have shown that multiple 3×3 convolution in sequence can emulate the effect of larger receptive fields, for examples 5×5 and 7×7. The VGG configuration is shown below: vgg-configuration VGG Configurations: Different columns represent different depths We will focus on configuration D - it was a fairly complex network to train at the time it was authored but its worthy competitor to newer architectures in pure performance terms. vgg-network VGG16 Network

Number of channels

In the VGG-16 model above we can see a common pattern: the number of channels increases as we go deeper into the network. The rationale goes beyond an empirical performance improvement relative to other settings of the number of convolutional filters. The first few layers in the network learn low-level and local features such as edges and corners. As we go deeper into the network, the layers learn more complex features that are compositions of the lower-level features learned in the earlier layers. To effectively capture this growing complexity, the network needs to increase the number of filters or channels to learn more varied and intricate patterns. Another way to describe this is via the effective receptive field of the network that only grows as we go deeper into the network. The deeper layer needs more channels to capture less local patterns that are by definition more complicated.

PyTorch reference

Key references: (Dumoulin & Visin, 2016; Simonyan & Zisserman, 2014; Peng et al., 2015; Howard et al., 2017; Zeiler & Fergus, 2013)

References

  • Dumoulin, V., Visin, F. (2016). A guide to convolution arithmetic for deep learning.
  • Howard, A., Zhu, M., Chen, B., Kalenichenko, D., Wang, W., et al. (2017). MobileNets: Efficient Convolutional Neural Networks for Mobile Vision Applications.
  • Peng, X., Sun, B., Ali, K., Saenko, K. (2015). What Do Deep CNNs Learn About Objects?.
  • Simonyan, K., Zisserman, A. (2014). Very Deep Convolutional Networks for Large-Scale Image Recognition.
  • Zeiler, M., Fergus, R. (2013). Visualizing and Understanding Convolutional Networks.