
repvgg_a0
Image classification333 ops9.1M params
Trains as a multi-branch network, runs as a plain stack of 3x3 convolutions and ReLU.
Image classification · 333 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
timm.create_model('repvgg_a2', pretrained=False) About this model's family
RepVGG is a convolutional network whose inference-time body is nothing but a stack of 3 × 3 convolution and ReLU, VGG-style, while the training-time model has a multi-branch topology. That decoupling is done by structural re-parameterization, which is where the name comes from. The motivation is that complicated multi-branch designs like residual addition in ResNet and branch concatenation in Inception make a model hard to implement and customize, slow down inference and reduce memory utilization.
During training, RepVGG uses identity and 1×1 branches inspired by ResNet, but arranged so that the branches can be removed afterwards. After training, simple algebra folds the identity branch, viewed as a degraded 1×1 conv, and the 1×1 branch, viewed as a degraded 3 × 3 conv, into a single 3 × 3 kernel. A body with one operator type, 3 × 3 conv followed by ReLU, makes RepVGG fast on generic computing devices like GPUs.
The network has 5 stages and downsamples with a stride-2 convolution at the beginning of each stage. RepVGG-A puts 1, 2, 4, 14, 1 layers in its five stages, and RepVGG-B is deeper, with 2 more layers in stages 2, 3 and 4. Widths come from uniformly scaling the classic [64, 128, 256, 512] setting with a multiplier a for the first four stages and b for the last. The g4 suffix on the captured repvgg_b1g4, repvgg_b2g4 and repvgg_b3g4 marks interleaved groupwise layers.
On ImageNet, RepVGG-A0 is 1.25% and 33% better than ResNet-18 in accuracy and speed. With groupwise layers, RepVGG-B1g4 is 0.37%/101% better than ResNet-101. Trained for 200 epochs, RepVGG models pass 80% top-1 accuracy, which the authors describe as the first time for plain models to catch up with the state of the art, to the best of their knowledge. In timm, the captured repvgg_a0 through repvgg_d2se are built on the ByobNet framework, with the original weights remapped and accuracies verified. The paper also uses RepVGG as a PSPNet backbone for semantic segmentation on Cityscapes.
Key idea. RepVGG uses structural re-parameterization to decouple a training-time multi-branch topology from an inference-time plain stack of 3 × 3 conv and ReLU.
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
@misc{ding2021repvggmakingvggstyleconvnets,
title={RepVGG: Making VGG-style ConvNets Great Again},
author={Xiaohan Ding and Xiangyu Zhang and Ningning Ma and Jungong Han and Guiguang Ding and Jian Sun},
year={2021},
eprint={2101.03697},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/2101.03697},
}