
shufflenet_v2_x0_5
Image classification258 ops1.4M params
A mobile CNN designed around measured speed, not FLOPs, built from a channel-split unit.
Image classification · 258 operations Checked
Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.
The file opened in a new tab. Use your browser's Save command there to keep it.
The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.
How this diagram was made
torchvision.models.get_model('shufflenet_v2_x1_0', weights=None) The 1.0x-width ShuffleNetV2.
About this model's family
ShuffleNet V2 is a light-weight image classifier built from a simple argument: design networks for measured speed on the target hardware, not for FLOP counts. The authors show that FLOPs are an indirect metric, and that networks with similar FLOPs can have very different speeds because of memory access cost and degree of parallelism. Timing ShuffleNet v1 and MobileNet v2 on a GPU and an ARM chip, they find that data I/O, channel shuffles and element-wise operations eat a considerable share of runtime that FLOPs never count.
From controlled experiments they distil four guidelines: use equal input and output channel widths, be wary of group convolution, avoid fragmenting the network into many small operators, and cut element-wise operations. Equal widths matter because the memory access cost of a 1x1 convolution has a lower bound set by FLOPs that is reached only when input and output channel counts are equal. The original ShuffleNet leaned on pointwise group convolutions and bottleneck blocks, both of which raise memory access cost, so the new unit drops them.
The key new operator is channel split: at the start of each unit the channels are divided into two branches, one left as identity and the other passed through three convolutions. The two 1x1 convolutions are plain rather than group-wise, and after concatenation a channel shuffle lets the branches exchange information. ShuffleNet v1's element-wise Add disappears, and Concat, Channel Shuffle and Channel Split are merged into a single element-wise operation. For downsampling the split is removed so the output channel count doubles. Half of the channels skip each block entirely, which the authors read as a form of feature reuse in the spirit of DenseNet. Compared with ShuffleNet v1 the only other change is an extra 1x1 convolution just before global average pooling to mix features.
The torchvision members here are the 0.5x, 1.0x, 1.5x and 2.0x widths, where the number of channels in each block is scaled to reach different complexity levels. In the paper those four levels run at 41M, 146M, 299M and 591M FLOPs with 1.4M, 2.3M, 3.5M and 7.4M weights. At a 40M FLOPs budget ShuffleNet v2 is 3.5% and 3.7% more accurate on ImageNet than ShuffleNet v1 and MobileNet v2. At 500 MFLOPs on GPU it runs 58% faster than MobileNet v2, 63% faster than ShuffleNet v1 and 25% faster than Xception. Scaled up to 50 layers it beats ResNet-50 on ImageNet with 40% fewer FLOPs.
Key idea. Four platform-aware guidelines for efficient CNN design, derived from measured speed rather than FLOPs, and the channel-split ShuffleNet V2 unit that follows all of them. The result is a network the authors show to be faster and more accurate than ShuffleNet v1 and MobileNet v2 on both GPU and ARM.
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
@misc{ma2018shufflenetv2practicalguidelines,
title={ShuffleNet V2: Practical Guidelines for Efficient CNN Architecture Design},
author={Ningning Ma and Xiangyu Zhang and Hai-Tao Zheng and Jian Sun},
year={2018},
eprint={1807.11164},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/1807.11164},
}