Skip to content

Commit

Permalink
add aa result and download link for policy
Browse files Browse the repository at this point in the history
  • Loading branch information
zhanghang1989 committed May 12, 2020
1 parent 5de2506 commit 317a3fc
Showing 1 changed file with 21 additions and 4 deletions.
25 changes: 21 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
# Fast-AutoAug-Torch

Search for [Fast AutoAugment](https://arxiv.org/abs/1905.00397) using [AutoTorch](http://autotorch.org/). [AutoAugment](https://arxiv.org/abs/1805.09501) and [RandAugment](https://arxiv.org/abs/1909.13719) are also implemented for comparison.
Search for [Fast AutoAugment](https://arxiv.org/abs/1905.00397) using [AutoTorch](http://autotorch.org/). [AutoAugment](https://arxiv.org/abs/1805.09501) and [RandAugment](https://arxiv.org/abs/1909.13719) are also implemented for comparison.

| model | augment| epoch | Acc | Weights |
This example will be used in the tutorial on [From HPO to NAS: Automated Deep Learning](https://hangzhang.org/CVPR2020/) at CVPR 2020.

| model | augment| epoch | Acc | weights |
|-------|--------|-------|-----|---------|
|ResNet-50| baseline | 120 | 76.48 |
|ResNet-50| AA | 120 | 76.66 |
|ResNet-50| Fast AA | 120| 76.88 |
|ResNet-50| Rand AA | 120 | 76.79 |
|ResNet-50| baseline | 270| 77.17 |
|ResNet-50| AA | 270 | 77.78 | [link](https://hangzh.s3-us-west-1.amazonaws.com/others/resnet50_aa-0cb27f8e.pth) |
|ResNet-50| Fast AA | 270| 77.73 | [link](https://hangzh.s3-us-west-1.amazonaws.com/others/resnet50_fast_aa-3342410e.pth) |
|ResNet-50| Rand AA | 270| **77.97** | [link](https://hangzh.s3-us-west-1.amazonaws.com/others/resnet50_rand_aug-e38097c7.pth) |

Expand Down Expand Up @@ -38,7 +41,7 @@ n=2, m=12,
``


## Quick Start
## Setup
### Install dependencies
- PyTorch, please follow the [instructions](https://pytorch.org/get-started/locally/).

Expand All @@ -63,7 +66,10 @@ pip install -v --no-cache-dir --global-option="--cpp_ext" --global-option="--cud
python prepare_imagenet.py --download-dir ./
```

## Fast AutoAugment Training
### Search policy
If you want to skip this step, you can download the searched policy [here](https://hangzh.s3-us-west-1.amazonaws.com/others/imagenet_policy.at).

```bash
python search_policy.py --reduced-size 60000 --epochs 120 --nfolds 8 --num-trials 200 --save-policy imagenet_policy.at
```
Expand All @@ -76,7 +82,18 @@ python search_policy.py --reduced-size 60000 --epochs 120 --nfolds 8 --num-trial
python train.py --dataset imagenet --model resnet50 --lr-scheduler cos --epochs 270 --checkname resnet50_fast_aa --lr 0.025 --batch-size 64 --auto-policy imagenet_policy.at
```

### Train with random AA
## Auto Augment and RandomAugment

### Training with AutoAugment policy
This repo only enables training with searched policy from the original paper.

```bash
# download the policy
wget https://hangzh.s3-us-west-1.amazonaws.com/others/aa_policy.at
python train.py --dataset imagenet --model resnet50 --lr-scheduler cos --epochs 270 --checkname resnet50_fast_aa --lr 0.025 --batch-size 64 --auto-policy aa_policy.at
```

### Training with RandomAugment
```bash
python train.py --dataset imagenet --model resnet50 --lr-scheduler cos --epochs 270 --checkname resnet50_rand_aug --lr 0.025 --batch-size 64 --rand-aug
```
Expand Down

0 comments on commit 317a3fc

Please sign in to comment.