Skip to content

Commit 2418f18

Browse files
committed
update cifar-100 distillation code
1 parent e500a39 commit 2418f18

File tree

2 files changed

+34
-7
lines changed

2 files changed

+34
-7
lines changed

README.md

Lines changed: 33 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,16 @@ By Tao Huang, Shan You, Fei Wang, Chen Qian, Chang Xu.
55
:fire: **DIST: a simple and effective KD method.**
66

77
## Updates
8-
### September 15, 2022
9-
DIST was accepted by NeurIPS 2022!
108

11-
### May 30, 2022
12-
Code for object detection is available.
9+
* **December 27, 2022**: Update CIFAR-100 distillation code and logs.
1310

14-
### May 27, 2022
15-
Code for ImageNet classification is available.
11+
* **September 20, 2022**: Release code for semantic segmentation task.
12+
13+
* **September 15, 2022**: DIST was accepted by NeurIPS 2022!
14+
15+
* **May 30, 2022**: Code for object detection is available.
16+
17+
* **May 27, 2022**: Code for ImageNet classification is available.
1618

1719
## Getting started
1820
### Clone training code
@@ -74,6 +76,31 @@ sh tools/dist_train.sh 8 ${CONFIG} ${MODEL} --teacher-model ${T_MODEL} --experim
7476
We implement our DIST on the official code of [Swin-Transformer](https://github.com/microsoft/Swin-Transformer).
7577
7678
79+
### CIFAR-100
80+
81+
Download and extract the [teacher checkpoints](https://github.com/hunto/DIST_KD/releases/download/v0.0.2/cifar_ckpts.zip) to your disk, then specify the path of the corresponding checkpoint `pth` file using `--teacher-ckpt`:
82+
83+
```
84+
cd classification
85+
sh tools/dist_train.sh 1 configs/strategies/distill/dist_cifar.yaml ${MODEL} --teacher-model ${T_MODEL} --experiment ${EXP_NAME} --teacher-ckpt ${CKPT}
86+
```
87+
88+
**NOTE**: For `MobileNetV2`, `ShuffleNetV1`, and `ShuffleNetV2`, `lr` and `warmup-lr` should be `0.01`:
89+
```
90+
sh tools/dist_train.sh 1 configs/strategies/distill/dist_cifar.yaml ${MODEL} --teacher-model ${T_MODEL} --experiment ${EXP_NAME} --teacher-ckpt ${CKPT} --lr 0.01 --warmup-lr 0.01
91+
```
92+
93+
|Student|Teacher|DIST|MODEL|T_MODEL|Log|
94+
|:--:|:--:|:--:|:--:|:--:|:--:|
95+
|WRN-40-1 (71.98)|WRN-40-2 (75.61)|74.43±0.24|`cifar_wrn_40_1`|`cifar_wrn_40_2`|[log](https://github.com/hunto/DIST_KD/releases/download/v0.0.2/log_cifar100_wrn_40_1-wrn_40_2.zip)|
96+
|ResNet-20 (69.06)|ResNet-56 (72.34)|71.75±0.30|`cifar_resnet20`|`cifar_resnet56`|[log](https://github.com/hunto/DIST_KD/releases/download/v0.0.2/log_cifar100_res56-res20.zip)|
97+
|ResNet-8x4 (72.50)|ResNet-32x4 (79.42)|76.31±0.19|`cifar_resnet8x4`|`cifar_resnet32x4`|[log](https://github.com/hunto/DIST_KD/releases/download/v0.0.2/log_cifar100_res32x4-res8x4.zip)|
98+
|MobileNetV2 (64.60)|ResNet-50 (79.34)|68.66±0.23|`cifar_mobile_half`|`cifar_ResNet50`|[log](https://github.com/hunto/DIST_KD/releases/download/v0.0.2/log_cifar100_res50-mbv2.zip)|
99+
|ShuffleNetV1 (70.50)|ResNet-32x4 (79.42)|76.34±0.18|`cifar_ShuffleV1`|`cifar_resnet32x4`|[log](https://github.com/hunto/DIST_KD/releases/download/v0.0.2/log_cifar100_res32x4-shufflev1.zip)|
100+
|ShuffleNetV2 (71.82)|ResNet-32x4 (79.42)|77.35±0.25|`cifar_ShuffleV2`|`cifar_resnet32x4`|[log](https://github.com/hunto/DIST_KD/releases/download/v0.0.2/log_cifar100_res32x4-shufflev2.zip)|
101+
102+
103+
77104
### COCO Detection
78105
79106
The training code is in [MasKD/mmrazor](https://github.com/hunto/MasKD/tree/main/mmrazor). An example to train `cascade_mask_rcnn_x101-fpn_r50`:

0 commit comments

Comments
 (0)