Skip to content

Commit 47ab19a

Browse files
yerlanyerlan
authored andcommitted
some pretrained models added. table updated
1 parent 67e209c commit 47ab19a

File tree

1 file changed

+26
-9
lines changed

1 file changed

+26
-9
lines changed

README.md

Lines changed: 26 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,32 @@ Usually it is very straightforward to use them on other datasets, but sometimes
55
Unfortunately, none of the pytorch repositories with ResNets on CIFAR10 provides an implementation as described in [original paper](https://arxiv.org/abs/1512.03385). If you just use torchvision's models on CIFAR10 you'll get the model **that differs in number of layers and parameters**. That is unacceptable if you want to directly compare ResNets on CIFAR10.
66
The purpose of this repo is to provide a valid pytorch implementation of ResNet-s for CIFAR10. Following models are provided:
77

8-
| Name | # layers | # params|
9-
|-----------|---------:|-------:|
10-
|ResNet20 | 20 | 0.27M |
11-
|ResNet32 | 32 | 0.46M |
12-
|ResNet44 | 44 | 0.66M |
13-
|ResNet56 | 56 | 0.85M |
14-
|ResNet110 | 110 | 1.7M |
15-
|ResNet1202 | 1202 | 19.4M |
8+
| Name | # layers | # params| Test err(paper) | Test err(this impl.)|
9+
|-----------|---------:|--------:|-----------------|---------------------|
10+
|ResNet20 | 20 | 0.27M | 8.75| 8.27|
11+
|ResNet32 | 32 | 0.46M | 7.51| 7.37|
12+
|ResNet44 | 44 | 0.66M | 7.17| |
13+
|ResNet56 | 56 | 0.85M | 6.97| 6.61|
14+
|ResNet110 | 110 | 1.7M | 6.43| |
15+
|ResNet1202 | 1202 | 19.4M | 7.93| |
1616

17-
And their implementation matches description in original paper.
17+
And their implementation matches description in original paper, with comparable or better test error.
18+
19+
## How to run?
20+
```bash
21+
git clone https://github.com/akamaster/pytorch_resnet_cifar10
22+
cd pytorch_resnet_cifar10
23+
chmod +x run.sh && ./run.sh
24+
```
25+
26+
## Details of training
27+
This implementation follows paper in straightforward manner with some caveats. **Firstly**, original paper uses 45k/5k train/validation split to train data, and selects best performing model based on performance on validation set. This implementation does not do any validation testing, so if you need to compare your results on ResNet head-to-head to orginal paper's keep this in mind. **Secondly**, if you want to train ResNet1202 keep in mind that you need 16GB memory on GPU.
28+
29+
## Pretrained models for download
30+
1. [ResNet20, 8.27% err](https://github.com/akamaster/pytorch_resnet_cifar10/raw/master/pretrained_models/resnet20.th)
31+
2. [ResNet32, 7.37% err](https://github.com/akamaster/pytorch_resnet_cifar10/raw/master/pretrained_models/resnet32.th)
32+
3. ResNet44
33+
4. [ResNet56, 6.61% err](https://github.com/akamaster/pytorch_resnet_cifar10/raw/master/pretrained_models/resnet20.th)
34+
5. ResNet1202
1835

1936
If you find this implementation is useful and used it in your production/academic work please cite/mention this page and author Yerlan Idelbayev.

0 commit comments

Comments
 (0)