concept group in category deep learning

This is an excerpt from Manning's book Deep Learning Design Patterns.
The VGG architecture, winner of 2014 ImageNet ILSVRC contest for image classification, is considered the father of modern convolutional neural networks (CNN); while AlexNet is considered the grandfather. VGG formalized the concept of constructing a CNN into components and groups using a pattern. Prior to VGG, CNNs were constructed as ConvNets, whose usefulness did not go beyond academic novelties. That is, VGGs were the first to have practical applications in production. Researchers for several years continued to compare more modern SOTA architecture developments to the VGG in their ablation studies and use VGGs for the classification backbone of early SOTA object detection models.
There is typically a progression in the number of filters per group, such as doubling the number of filters.
Figure 5.8 is a depiction of a MobileNet v2 group, where the first inverted residual block is strided for reducing the size of the feature maps to offset the progressive increase in the number of feature maps per group. As noted in the diagram, only groups number 2, 3, 4 and 6, of 8, start with a strided inverted residual block. In other words, groups 1, 5, 7 and 8 start with a non-strided residual block. Additionally, each non-strided block has an identity link, and the strided blocks do not have an identity link.
Fig. 5.8 MobileNet v2 Group Micro-Architecture
![]()
Below is an example implementation of a MobileNet v2 group. The group follows the convention where the first block does a dimensionality reduction to reduce the size of feature maps. In this case, the first inverted block is strided (feature pooling), with the remaining blocks are not strided (no feature pooling).
def group(x, n_filters, n_blocks, alpha, expansion=6, strides=(2, 2)): """ Construct an Inverted Residual Group x : input to the group n_filters : number of filters n_blocks : number of blocks in the group alpha : width multiplier expansion : multiplier for expanding the number of filters strides : whether the first inverted residual block is strided. """ x = inverted_block(x, n_filters, alpha, expansion, strides=strides) #A for _ in range(n_blocks - 1): #B x = inverted_block(x, n_filters, alpha, expansion, strides=(1, 1)) return x#A The first inverted residual block in the group may be strided.