Skip to content

Commit 3341b7f

Browse files
committed
Add ImageNet. Reorganize the code.
1 parent fa48c6b commit 3341b7f

File tree

12 files changed

+428
-379
lines changed

12 files changed

+428
-379
lines changed

README.md

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,26 @@ Classification on CIFAR10/100 with PyTorch.
1010

1111
## Results
1212

13+
### CIFAR
1314
Top1 error rate on CIFAR10/100 are reported. You may get different results when training your models with different initialization.
1415

1516
| Model | Params (M, CIFAR10)| CIFAR-10 (%) | CIFAR-100 (%) |
1617
| ------------------- | ------------------ | ------------------ | ------------------ |
1718
| alexnet | 2.47 | 22.78 | 56.13 |
1819
| vgg19_bn | 20.04 | 6.66 | 28.05 |
19-
| Resnet-110 | 1.70 | local | local |
20-
| Resnet-1202 | 18.58 | 186 | 186 |
21-
| ResNeXt-29, 8x64 | 34.43 | 3.62 | |
22-
| ResNeXt-29, 16x64 | 68.16 | 164 | 10137 |
23-
| WRN-28-10 (drop 0.3) | 36.48 | 179 | 10137 |
20+
| Resnet-110 | 1.70 | 6.11 | 28.86 |
21+
| WRN-28-10 (drop 0.3) | 36.48 | 3.79 | 18.14 |
22+
| ResNeXt-29, 8x64 | 34.43 | 3.69 | 17.38 |
23+
| ResNeXt-29, 16x64 | 68.16 | 3.53 | 10137 |
24+
25+
### ImageNet
26+
Single-crop (224x224) validation error rate
27+
28+
29+
| Model | Params (M) | Top-1 Error (%) | Top-5 Error (%) |
30+
| ------------------- | ------------------ | ------------------ | ------------------ |
31+
| Resnet-101 | 44.55 | | |
32+
2433

2534
## Supported Architectures
2635

@@ -33,8 +42,10 @@ Since the size of images in CIFAR dataset is `32x32`, popular network structures
3342
- [x] [Wide Residual Networks](http://arxiv.org/abs/1605.07146) (Imported from [WideResNet-pytorch](https://github.com/xternalz/WideResNet-pytorch))
3443
- [ ] [DenseNet](https://arxiv.org/abs/1608.06993)
3544

36-
## Training recipes
37-
Please see the [Training recipes](TRAINING.md) for how to train the models.
45+
### ImageNet
46+
- [x] All models in `torchvision.models` (alexnet, vgg, resnet, densenet, inception_v3, squeezenet)
47+
- [ ] [ResNeXt](https://arxiv.org/abs/1611.05431)
48+
- [ ] [Wide Residual Networks](http://arxiv.org/abs/1605.07146)
3849

39-
## TODO
40-
- [ ] Add ImageNet
50+
## Training recipes
51+
Please see the [Training recipes](TRAINING.md) for how to train the models.

TRAINING.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
### CIFAR-10
2+
## CIFAR-10
33

44
#### AlexNet
55
```
@@ -36,7 +36,7 @@ python cifar.py -a resnext --depth 29 --cardinality 16 --widen-factor 4 --schedu
3636
python cifar.py -a wrn --depth 28 --depth 28 --widen-factor 10 --drop 0.3 --epochs 200 --schedule 60 120 160 --wd 5e-4 --gamma 0.2 --checkpoint checkpoints/cifar10/WRN-28-10-drop
3737
```
3838

39-
### CIFAR-100
39+
## CIFAR-100
4040

4141
#### AlexNet
4242
```
@@ -69,4 +69,12 @@ python cifar.py -a resnext --dataset cifar100 --depth 29 --cardinality 16 --wide
6969

7070
#### WRN-28-10-drop
7171
```
72-
python cifar.py -a wrn --dataset cifar100 --depth 28 --depth 28 --widen-factor 10 --drop 0.3 --epochs 200 --schedule 60 120 160 --wd 5e-4 --gamma 0.2 --checkpoint checkpoints/cifar100/WRN-28-10-drop
72+
python cifar.py -a wrn --dataset cifar100 --depth 28 --depth 28 --widen-factor 10 --drop 0.3 --epochs 200 --schedule 60 120 160 --wd 5e-4 --gamma 0.2 --checkpoint checkpoints/cifar100/WRN-28-10-drop
73+
```
74+
75+
76+
## ImageNet
77+
### ResNet-101
78+
```
79+
python imagenet.py -a resnet101 --data ~/dataset/ILSVRC2012/ ---epochs 90 --schedule 31 61 --gamma 0.1 -j 12 -c checkpoints/imagenet/resnet101
80+
```

cifar-att.py

Lines changed: 0 additions & 292 deletions
This file was deleted.

cifar.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
import torch.utils.data as data
1919
import torchvision.transforms as transforms
2020
import torchvision.datasets as datasets
21-
import models
21+
import models.cifar as models
2222

2323
from utils import Bar, Logger, AverageMeter, accuracy, mkdir_p, savefig
2424

0 commit comments

Comments
 (0)