Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

RM Operation can equivalently convert ResNet to VGG, which is better for pruning; and can help RepVGG perform better when the depth is large.

NotificationsYou must be signed in to change notification settings

fxmeng/RMNet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

64 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This repository is the official implementation of "RMNet: Equivalently Removing Residual Connection from Networks". Welcome to discuss this paper with me on知乎

Updates

Feb 18,2022, For better understanding, we implement a simpilify version RM Operation onResNet andMobileNetV2.

Jan 25,2022, RM+AMC purning:

https://github.com/fxmeng/RMNet/blob/aec110b528c2646a19a20777bd5b93500e9b74a3/RM+AMC/README.md

Dec 24, 2021, RMNet Pruning:

python train_pruning.py --sr xxx --threshold xxx

python train_pruning.py --eval xxx/ckpt.pth

python train_pruning.py --finetune xxx/ckpt.pth

Nov 15, 2021, RM Opeartion now supports PreActResNet.

Nov 13, 2021, RM Opeartion now supports SEBlock.

Requirements

To install requirements:

pip install torchpip install torchvision

Training

To train the models in the paper, run this command:

python train.py -a rmrep_69 --dist-url 'tcp://127.0.0.1:23333' --dist-backend 'nccl' --multiprocessing-distributed --world-size 1 --rank 0 --workers 32 [imagenet-folder with train and val folders]

Evaluation

To evaluate our pre-trained models trained on ImageNet, run:

python train.py -a rmrep_69 -e checkpoint/rmrep_69.pth.tar [imagenet-folder with train and val folders]

Results

Our model achieves the following performance on :

Help pruning achieve better performancedrive.google

MethodSpeed(Imgs/Sec)Acc(%)
Baseline375271.79
AMC(0.75)487370.94
AMC(0.7)494970.84
AMC(0.5)548368.89
RM+AMC(0.75)512073.21
RM+AMC(0.7)523872.63
RM+AMC(0.6)567571.88
RM+AMC(0.5)625071.01

Help RepVGG achieve better performance even when the depth is large

ArchTop-1 Accuracy(%)Top-5 Accuracy(%)Train FLOPs(G)Test FLOPs(M)
RepVGG-2172.50890.8402.42.1
RepVGG-21(RM 0.25)72.59090.9242.12.1
RepVGG-3774.40891.9004.44.0
RepVGG-37(RM 0.25)74.47891.8923.94.0
RepVGG-6974.52692.1828.67.7
RepVGG-69(RM 0.5)75.08892.1446.57.7
RepVGG-13370.91289.78816.815.1
RepVGG-133(RM 0.75)74.56092.00010.615.1

Image Classification on ImageNetdrive.google.

Model nameTop 1 Accuracy(%)Top 5 Accuracy(%)
RMNeXt 41x5_1678.49894.086
RMNeXt 50x5_3279.07694.444
RMNeXt 50x6_3279.5794.644
RMNeXt 101x6_1680.0794.918
RMNeXt 152x6_3280.35680.356

Citation

If you find this code useful, please cite the following paper:

@misc{meng2021rmnet,      title={RMNet: Equivalently Removing Residual Connection from Networks},       author={Fanxu Meng and Hao Cheng and Jiaxin Zhuang and Ke Li and Xing Sun},      year={2021},      eprint={2111.00687},      archivePrefix={arXiv},      primaryClass={cs.CV}}

Contributing

Our code is based onRepVGG andnni/amc pruning

About

RM Operation can equivalently convert ResNet to VGG, which is better for pruning; and can help RepVGG perform better when the depth is large.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp