Skip to content

Commit

Permalink
cm2
Browse files Browse the repository at this point in the history
  • Loading branch information
sunshangquan committed Mar 10, 2024
1 parent f5a086f commit 3ec213f
Show file tree
Hide file tree
Showing 32 changed files with 8 additions and 85 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,26 +47,26 @@ sudo python setup.py develop

```bash
# KD
python tools/train.py --cfg configs/cifar100/kd/res32x4_res8x4.yaml
python tools/train.py --cfg configs/cifar100/kd/resnet32x4_resnet8x4.yaml
# KD+Ours
python tools/train.py --cfg configs/cifar100/kd/res32x4_res8x4.yaml --logit-stand --base-temp 2 --kd-weight 9
python tools/train.py --cfg configs/cifar100/kd/resnet32x4_resnet8x4.yaml --logit-stand --base-temp 2 --kd-weight 9
```

2. For DKD

```bash
# DKD
python tools/train.py --cfg configs/cifar100/dkd/res32x4_res8x4.yaml
python tools/train.py --cfg configs/cifar100/dkd/resnet32x4_resnet8x4.yaml
# DKD+Ours
python tools/train.py --cfg configs/cifar100/dkd/res32x4_res8x4.yaml --logit-stand --base-temp 2 --kd-weight 9
python tools/train.py --cfg configs/cifar100/dkd/resnet32x4_resnet8x4.yaml --logit-stand --base-temp 2 --kd-weight 9
```
3. For MLKD

```bash
# MLKD
python tools/train.py --cfg configs/cifar100/mlkd/res32x4_res8x4.yaml
python tools/train.py --cfg configs/cifar100/mlkd/resnet32x4_resnet8x4.yaml
# MLKD+Ours
python tools/train.py --cfg configs/cifar100/mlkd/res32x4_res8x4.yaml --logit-stand --base-temp 2 --kd-weight 9
python tools/train.py --cfg configs/cifar100/mlkd/resnet32x4_resnet8x4.yaml --logit-stand --base-temp 2 --kd-weight 9
```

4. For CTKD
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
17 changes: 0 additions & 17 deletions configs/cifar100/kd/res32x4_res8x4.yaml

This file was deleted.

File renamed without changes.
60 changes: 0 additions & 60 deletions configs/cifar100/mlkd/res32x4_vgg8_2.yaml

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file modified mdistiller/engine/__pycache__/cfg.cpython-38.pyc
Binary file not shown.
4 changes: 2 additions & 2 deletions mdistiller/engine/cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ def show_cfg(cfg):
# Distillation Methods

# KD CFG
CFG.KD = CN()
CFG.KD.TEMPERATURE = 2
CFG.KD.TEMPERATURE = 4
CFG.KD.LOSS = CN()
CFG.KD.LOSS.KD_WEIGHT = 9
CFG.KD.LOSS.CE_WEIGHT = 0.1
CFG.KD.LOSS.KD_WEIGHT = 9

# AT CFG
Expand Down

0 comments on commit 3ec213f

Please sign in to comment.