Skip to content
This repository has been archived by the owner on Sep 18, 2024. It is now read-only.

[SPOS] Clarify checkpoint directory in docs #1891

Merged
merged 64 commits into from
Dec 30, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
0d1ca70
checkpoint
Nov 29, 2019
5363aa4
checkpoint
Nov 29, 2019
a4fc9cc
checkpoint
Nov 29, 2019
9bc24b0
checkpoint
ultmaster Dec 1, 2019
7b6ff0d
checkpoint
ultmaster Dec 1, 2019
a412ac9
checkpoint
Dec 2, 2019
c720373
checkpoint
ultmaster Dec 2, 2019
2edf637
checkpoint
ultmaster Dec 2, 2019
990932b
checkpoint
ultmaster Dec 3, 2019
117399c
finish tester
Dec 3, 2019
b4763d9
fix bugs
ultmaster Dec 3, 2019
dfdb9fb
checkpoint
Dec 3, 2019
f16256d
checkpoint
Dec 3, 2019
3115531
fix a few issues
ultmaster Dec 3, 2019
971822c
add model checkpoint
ultmaster Dec 3, 2019
5f51bb5
update
ultmaster Dec 3, 2019
69261af
fix evolution tuner
ultmaster Dec 4, 2019
79ad154
Merge branch 'nas-spos' of github.com:ultmaster/nni into nas-spos
ultmaster Dec 4, 2019
e3dddf1
update
ultmaster Dec 4, 2019
bc38366
update training from scratch
ultmaster Dec 4, 2019
a445e54
add decision
Dec 5, 2019
99b3b74
decision class track in
Dec 6, 2019
bdfc2e7
decision class track in
Dec 6, 2019
1a55007
update from scratch training code
Dec 6, 2019
c7a10d2
update
ultmaster Dec 6, 2019
fc1eb99
update
ultmaster Dec 6, 2019
34ffa31
fix cur_step error
ultmaster Dec 6, 2019
ef387c9
update
ultmaster Dec 6, 2019
082abcd
update
ultmaster Dec 7, 2019
28c5b2d
update
ultmaster Dec 7, 2019
ff2d2e7
update format
ultmaster Dec 9, 2019
c034b0a
update
ultmaster Dec 11, 2019
8f77321
update
ultmaster Dec 12, 2019
1f29960
update
ultmaster Dec 13, 2019
e63c3f3
update
ultmaster Dec 13, 2019
048d604
update
ultmaster Dec 13, 2019
45d0d7a
update
ultmaster Dec 13, 2019
d498a38
update
ultmaster Dec 14, 2019
dbe8680
update
ultmaster Dec 17, 2019
f4e893d
update
ultmaster Dec 17, 2019
c24322a
update
ultmaster Dec 17, 2019
138764e
updaste
ultmaster Dec 17, 2019
7fb280a
fix pylint
ultmaster Dec 18, 2019
001c581
update batch size
ultmaster Dec 18, 2019
5a00af5
update
ultmaster Dec 23, 2019
4cef622
add evolution doc
Dec 23, 2019
ca47a5b
remove decision
Dec 23, 2019
5c2fbd2
add docstring
Dec 23, 2019
e8d67ca
add docstring
Dec 23, 2019
18bd184
improve docs
Dec 23, 2019
38bc071
Merge remote-tracking branch 'upstream/master' into nas-spos-2
Dec 23, 2019
489c6de
improve architecture readability
Dec 23, 2019
752c7d3
add note for provided archit
Dec 23, 2019
a60e8e5
add license
Dec 24, 2019
63271ab
update
Dec 24, 2019
9871fa6
use enum string
Dec 24, 2019
86b34e6
add reproduction results
Dec 24, 2019
7ba24b0
add reproduction results
Dec 24, 2019
ba009a7
add reproduction results
Dec 24, 2019
1db5cb7
checkpoint docs
Dec 30, 2019
8971a4c
Merge remote-tracking branch 'upstream/v1.3' into nas-spos-2
Dec 30, 2019
cbee845
imagenet data path
Dec 30, 2019
24c3ff0
imagenet data path
Dec 30, 2019
c7cb30e
Merge branch 'v1.3' into nas-spos-2
Dec 30, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions examples/nas/spos/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Only GPU version is provided here.
Need to download the flops lookup table from [here](https://1drv.ms/u/s!Am_mmG2-KsrnajesvSdfsq_cN48?e=aHVppN).
Put `op_flops_dict.pkl` and `checkpoint-150000.pth.tar` (if you don't want to retrain the supernet) under `data` directory.

Prepare ImageNet in the standard format (follow the script [here](https://gist.github.com/BIGBALLON/8a71d225eff18d88e469e6ea9b39cef4)). Link it to `data/imagenet` will be more convenient.
Prepare ImageNet in the standard format (follow the script [here](https://gist.github.com/BIGBALLON/8a71d225eff18d88e469e6ea9b39cef4)). Linking it to `data/imagenet` will be more convenient.

After preparation, it's expected to have the following code structure:

Expand Down Expand Up @@ -48,7 +48,7 @@ spos
python supernet.py
```

Will export the checkpoint to checkpoints directory, for the next step.
Will export the checkpoint to `checkpoints` directory, for the next step.

NOTE: The data loading used in the official repo is [slightly different from usual](https://github.com/megvii-model/SinglePathOneShot/issues/5), as they use BGR tensor and keep the values between 0 and 255 intentionally to align with their own DL framework. The option `--spos-preprocessing` will simulate the behavior used originally and enable you to use the checkpoints pretrained.

Expand All @@ -64,6 +64,8 @@ nnictl ss_gen -t "python tester.py"

This will generate a file called `nni_auto_gen_search_space.json`, which is a serialized representation of your search space.

By default, it will use `checkpoint-150000.pth.tar` downloaded previously. In case you want to use the checkpoint trained by yourself from the last step, specify `--checkpoint` in the command in `config_search.yml`.

Then search with evolution tuner.

```
Expand Down
2 changes: 1 addition & 1 deletion examples/nas/spos/config_search.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ tuner:
classFileName: tuner.py
className: EvolutionWithFlops
trial:
command: python tester.py --imagenet-dir /path/to/your/imagenet --spos-prep
command: python tester.py --spos-prep
codeDir: .
gpuNum: 1