-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Format with flake8 * Release pretrained model of usnets * Create MODEL_ZOO.md * Update README.md
- Loading branch information
Showing
16 changed files
with
601 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
logs | ||
data | ||
.flake8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Slimmable Model Zoo | ||
|
||
## Slimmable Neural Networks ([ICLR 2019](https://arxiv.org/abs/1812.08928)) | ||
|
||
|
||
| Model | Switches (Widths) | Top-1 Err. | MFLOPs | Model ID | | ||
| :--- | :---: | :---: | ---: | :---: | | ||
| S-MobileNet v1 | 1.00<br>0.75<br>0.50<br>0.25 | 28.5<br>30.5<br>35.2<br>46.9 | 569<br>325<br>150<br>41 | [a6285db](https://github.com/JiahuiYu/slimmable_networks/files/2709079/s_mobilenet_v1_0.25_0.5_0.75_1.0.pt.zip) | | ||
| S-MobileNet v2 | 1.00<br>0.75<br>0.50<br>0.35 | 29.5<br>31.1<br>35.6<br>40.3 | 301<br>209<br>97<br>59 | [0593ffd](https://github.com/JiahuiYu/slimmable_networks/files/2709080/s_mobilenet_v2_0.35_0.5_0.75_1.0.pt.zip) | | ||
| S-ShuffleNet | 2.00<br>1.00<br>0.50 | 28.6<br>34.5<br>42.8 | 524<br>138<br>38 | [1427f66](https://github.com/JiahuiYu/slimmable_networks/files/2709082/s_shufflenet_0.5_1.0_2.0.pt.zip) | | ||
| S-ResNet-50 | 1.00<br>0.75<br>0.50<br>0.25 | 24.0<br>25.1<br>27.9<br>35.0 | 4.1G<br>2.3G<br>1.1G<br>278 | [3fca9cc](https://drive.google.com/open?id=1f6q37OkZaz_0GoOAwllHlXNWuKwor2fC) | | ||
|
||
|
||
## Universally Slimmable Networks and Improved Training Techniques ([Preprint](https://arxiv.org/abs/1903.05134)) | ||
|
||
| Model | Widths | Top-1 Err. | MFLOPs | Model ID | | ||
| :--- | :--- | :---: | ---: | :---: | | ||
| US-MobileNet v1 | 1.0<br> 0.975<br> 0.95<br> 0.925<br> 0.9<br> 0.875<br> 0.85<br> 0.825<br> 0.8<br> 0.775<br> 0.75<br> 0.725<br> 0.7<br> 0.675<br> 0.65<br> 0.625<br> 0.6<br> 0.575<br> 0.55<br> 0.525<br> 0.5<br> 0.475<br> 0.45<br> 0.425<br> 0.4<br> 0.375<br> 0.35<br> 0.325<br> 0.3<br> 0.275<br> 0.25 | 28.2<br> 28.3<br> 28.4<br> 28.7<br> 28.7<br> 29.1<br> 29.4<br> 29.7<br> 30.2<br> 30.3<br> 30.5<br> 30.9<br> 31.2<br> 31.7<br> 32.2<br> 32.5<br> 33.2<br> 33.7<br> 34.4<br> 35.0<br> 35.8<br> 36.5<br> 37.3<br> 38.1<br> 39.0<br> 40.0<br> 41.0<br> 41.9<br> 42.7<br> 44.2<br> 44.3 | 568<br> 543<br> 517<br> 490<br> 466<br> 443<br> 421<br> 389<br> 366<br> 345<br> 325<br> 306<br> 287<br> 267<br> 249<br> 232<br> 217<br> 201<br> 177<br> 162<br> 149<br> 136<br> 124<br> 114<br> 100<br> 89<br> 80<br> 71<br> 64<br> 48<br> 41 | [13d5af2](https://github.com/JiahuiYu/slimmable_networks/files/2979952/us_mobilenet_v1_calibrated.pt.zip) | | ||
| US-MobileNet v2 | 1.0<br> 0.975<br> 0.95<br> 0.925<br> 0.9<br> 0.875<br> 0.85<br> 0.825<br> 0.8<br> 0.775<br> 0.75<br> 0.725<br> 0.7<br> 0.675<br> 0.65<br> 0.625<br> 0.6<br> 0.575<br> 0.55<br> 0.525<br> 0.5<br> 0.475<br> 0.45<br> 0.425<br> 0.4<br> 0.375<br> 0.35 | 28.5<br> 28.5<br> 28.8<br> 28.9<br> 29.1<br> 29.1<br> 29.4<br> 29.9<br> 30.0<br> 30.2<br> 30.4<br> 30.7<br> 31.1<br> 31.4<br> 31.7<br> 31.7<br> 32.4<br> 32.4<br> 34.4<br> 34.6<br> 34.9<br> 35.1<br> 35.8<br> 35.8<br> 36.6<br> 36.7<br> 37.7<br> | 300<br> 299<br> 284<br> 274<br> 269<br> 268<br> 254<br> 235<br> 222<br> 213<br> 209<br> 185<br> 173<br> 165<br> 161<br> 161<br> 151<br> 150<br> 106<br> 100<br> 97<br> 96<br> 88<br> 88<br> 80<br> 80<br> 59 | [3880cad](https://github.com/JiahuiYu/slimmable_networks/files/2979953/us_mobilenet_v2_calibrated.pt.zip) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
# =========================== Basic Settings =========================== | ||
# machine info | ||
num_gpus_per_job: 4 # number of gpus each job need | ||
num_cpus_per_job: 63 # number of cpus each job need | ||
memory_per_job: 380 # memory requirement each job need | ||
gpu_type: "nvidia-tesla-p100" | ||
|
||
# data | ||
dataset: imagenet1k | ||
data_transforms: imagenet1k_basic | ||
data_loader: imagenet1k_basic | ||
dataset_dir: data/imagenet | ||
data_loader_workers: 62 | ||
|
||
# info | ||
num_classes: 1000 | ||
image_size: 224 | ||
topk: [1, 5] | ||
num_epochs: 100 | ||
|
||
# optimizer | ||
optimizer: sgd | ||
momentum: 0.9 | ||
weight_decay: 0.0001 | ||
nesterov: True | ||
|
||
# lr | ||
lr: 0.1 | ||
lr_scheduler: multistep | ||
multistep_lr_milestones: [30, 60, 90] | ||
multistep_lr_gamma: 0.1 | ||
|
||
# model profiling | ||
profiling: [gpu] | ||
|
||
# pretrain, resume, test_only | ||
pretrained: '' | ||
resume: '' | ||
test_only: False | ||
|
||
# | ||
random_seed: 1995 | ||
batch_size: 256 | ||
model: '' | ||
reset_parameters: True | ||
|
||
|
||
# =========================== Override Settings =========================== | ||
log_dir: logs/ | ||
slimmable_training: True | ||
model: models.us_mobilenet_v1 | ||
width_mult: 1.0 | ||
width_mult_list: [0.25, 0.275, 0.3, 0.325, 0.35, 0.375, 0.4, 0.425, 0.45, 0.475, 0.5, 0.525, 0.55, 0.575, 0.6, 0.625, 0.65, 0.675, 0.7, 0.725, 0.75, 0.775, 0.8, 0.825, 0.85, 0.875, 0.9, 0.925, 0.95, 0.975, 1.0] | ||
width_mult_range: [0.25, 1.0] | ||
data_transforms: imagenet1k_mobile | ||
# num_gpus_per_job: | ||
# lr: | ||
# lr_scheduler: | ||
# exp_decaying_lr_gamma: | ||
# num_epochs: | ||
# batch_size: | ||
# test pretrained | ||
test_only: True | ||
pretrained: logs/us_mobilenet_v1_calibrated.pt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
# =========================== Basic Settings =========================== | ||
# machine info | ||
num_gpus_per_job: 4 # number of gpus each job need | ||
num_cpus_per_job: 63 # number of cpus each job need | ||
memory_per_job: 380 # memory requirement each job need | ||
gpu_type: "nvidia-tesla-p100" | ||
|
||
# data | ||
dataset: imagenet1k | ||
data_transforms: imagenet1k_basic | ||
data_loader: imagenet1k_basic | ||
dataset_dir: data/imagenet | ||
data_loader_workers: 62 | ||
|
||
# info | ||
num_classes: 1000 | ||
image_size: 224 | ||
topk: [1, 5] | ||
num_epochs: 100 | ||
|
||
# optimizer | ||
optimizer: sgd | ||
momentum: 0.9 | ||
weight_decay: 0.0001 | ||
nesterov: True | ||
|
||
# lr | ||
lr: 0.1 | ||
lr_scheduler: multistep | ||
multistep_lr_milestones: [30, 60, 90] | ||
multistep_lr_gamma: 0.1 | ||
|
||
# model profiling | ||
profiling: [gpu] | ||
|
||
# pretrain, resume, test_only | ||
pretrained: '' | ||
resume: '' | ||
test_only: False | ||
|
||
# | ||
random_seed: 1995 | ||
batch_size: 256 | ||
model: '' | ||
reset_parameters: True | ||
|
||
|
||
# =========================== Override Settings =========================== | ||
log_dir: logs/ | ||
slimmable_training: True | ||
model: models.us_mobilenet_v2 | ||
width_mult: 1.0 | ||
width_mult_list: [0.35, 0.375, 0.4, 0.425, 0.45, 0.475, 0.5, 0.525, 0.55, 0.575, 0.6, 0.625, 0.65, 0.675, 0.7, 0.725, 0.75, 0.775, 0.8, 0.825, 0.85, 0.875, 0.9, 0.925, 0.95, 0.975, 1.0] | ||
width_mult_range: [0.35, 1.0] | ||
data_transforms: imagenet1k_mobile | ||
# num_gpus_per_job: | ||
# lr: | ||
# lr_scheduler: | ||
# exp_decaying_lr_gamma: | ||
# num_epochs: | ||
# batch_size: | ||
# test pretrained | ||
test_only: True | ||
pretrained: logs/us_mobilenet_v2_calibrated.pt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.