Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fix] Fix configs of wrn models and ofd. #361

Merged
merged 3 commits into from
Nov 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
data_preprocessor=dict(
type='ImgDataPreprocessor',
# RGB format normalization parameters
mean=[123.675, 116.28, 103.53],
std=[58.395, 57.12, 57.375],
mean=[125.307, 122.961, 113.8575],
std=[51.5865, 50.847, 51.255],
# convert image from BGR to RGB
bgr_to_rgb=True),
bgr_to_rgb=False),
architecture=dict(
cfg_path= # noqa: E251
'mmrazor::vanilla/mmcls/wide-resnet/wrn16-w2_b16x8_cifar10.py',
Expand Down
34 changes: 34 additions & 0 deletions configs/vanilla/mmcls/wide-resnet/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Wide-ResNet

> [Wide Residual Networks](https://arxiv.org/abs/1605.07146)

<!-- [ALGORITHM] -->

## Abstract

Deep residual networks were shown to be able to scale up to thousands of layers and still have improving performance. However, each fraction of a percent of improved accuracy costs nearly doubling the number of layers, and so training very deep residual networks has a problem of diminishing feature reuse, which makes these networks very slow to train. To tackle these problems, in this paper we conduct a detailed experimental study on the architecture of ResNet blocks, based on which we propose a novel architecture where we decrease depth and increase width of residual networks. We call the resulting network structures wide residual networks (WRNs) and show that these are far superior over their commonly used thin and very deep counterparts. For example, we demonstrate that even a simple 16-layer-deep wide residual network outperforms in accuracy and efficiency all previous deep residual networks, including thousand-layer-deep networks, achieving new state-of-the-art results on CIFAR, SVHN, COCO, and significant improvements on ImageNet.

<div align=center>
<img src="https://user-images.githubusercontent.com/26739999/156701329-2c7ec7bc-23da-401b-86bf-dea8567ccee8.png" width="90%"/>
</div>

## Results and models

### Cifar10

| Model | Top-1 (%) | Config | Download |
| :----: | :-------: | :-----------------------------------: | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
| WRN-16 | 93.04 | [config](./wrn16-w2_b16x8_cifar10.py) | [model](https://openmmlab-share.oss-cn-hangzhou.aliyuncs.com/mmrazor/v1/wide_resnet/wrn16_2_b16x8_cifar10_20220831_204709-446b466e.pth) \| [log](https://openmmlab-share.oss-cn-hangzhou.aliyuncs.com/mmrazor/v1/wide_resnet/wrn16_2_b16x8_cifar10_20220831_204709-446b466e.json) |
| WRN-22 | | [config](./wrn22-w4_b16x8_cifar10.py) | [model](<>) \| [log](<>) |
| WRN-28 | 95.41 | [config](./wrn28-w4_b16x8_cifar10.py) | [model](https://openmmlab-share.oss-cn-hangzhou.aliyuncs.com/mmrazor/v1/wide_resnet/wrn28_4_b16x8_cifar10_20220831_173536-d6f8725c.pth) \| [log](https://openmmlab-share.oss-cn-hangzhou.aliyuncs.com/mmrazor/v1/wide_resnet/wrn28_4_b16x8_cifar10_20220831_173536-d6f8725c.json) |
| WRN-40 | | [config](./wrn40-w2_b16x8_cifar10.py) | [model](<>) \| [log](<>) |

## Citation

```bibtex
@INPROCEEDINGS{Zagoruyko2016WRN,
author = {Sergey Zagoruyko and Nikos Komodakis},
title = {Wide Residual Networks},
booktitle = {BMVC},
year = {2016}}
```
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
_base_ = ['wrn16_2_b16x8_cifar10.py']
_base_ = ['wrn16_w2_b16x8_cifar10.py']
model = dict(
backbone=dict(depth=22, widen_factor=4), head=dict(in_channels=256, ))
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
_base_ = ['wrn16_2_b16x8_cifar10.py']
_base_ = ['wrn16_w2_b16x8_cifar10.py']
model = dict(
backbone=dict(depth=28, widen_factor=4), head=dict(in_channels=256, ))
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
_base_ = ['wrn16_2_b16x8_cifar10.py']
_base_ = ['wrn16_w2_b16x8_cifar10.py']
model = dict(
backbone=dict(depth=40, widen_factor=2), head=dict(in_channels=128, ))