forked from PaddlePaddle/Paddle
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add fpgm pruning scripts for ResNet34, MobileNetV1, MobileNetV2 test=…
…develop (PaddlePaddle#240)
- Loading branch information
1 parent
d7116aa
commit 517605a
Showing
4 changed files
with
63 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/bash | ||
export CUDA_VISIBLE_DEVICES=0,1 | ||
export FLAGS_fraction_of_gpu_memory_to_use=0.98 | ||
python train.py \ | ||
--model="MobileNet" \ | ||
--pretrained_model="/workspace/models/MobileNetV1_pretrained" \ | ||
--data="imagenet" \ | ||
--pruned_ratio=0.3125 \ | ||
--lr=0.1 \ | ||
--num_epochs=120 \ | ||
--test_period=10 \ | ||
--step_epochs 30 60 90\ | ||
--l2_decay=3e-5 \ | ||
--lr_strategy="piecewise_decay" \ | ||
--criterion="geometry_median" \ | ||
--model_path="./fpgm_mobilenetv1_models" \ | ||
2>&1 | tee fpgm_mobilenetv1_train.log |
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,17 @@ | ||
#!/bin/bash | ||
export CUDA_VISIBLE_DEVICES=0,1 | ||
export FLAGS_fraction_of_gpu_memory_to_use=0.98 | ||
python train.py \ | ||
--model="MobileNetV2" \ | ||
--pretrained_model="/workspace/models/MobileNetV2_pretrained" \ | ||
--data="imagenet" \ | ||
--pruned_ratio=0.325 \ | ||
--lr=0.001 \ | ||
--num_epochs=90 \ | ||
--test_period=5 \ | ||
--step_epochs 30 60 80\ | ||
--l2_decay=1e-4 \ | ||
--lr_strategy="piecewise_decay" \ | ||
--criterion="geometry_median" \ | ||
--model_path="./fpgm_mobilenetv2_models" \ | ||
2>&1 | tee fpgm_mobilenetv2_train.log |
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,12 @@ | ||
#!/bin/bash | ||
export CUDA_VISIBLE_DEVICES=0,1,2,3 | ||
export FLAGS_fraction_of_gpu_memory_to_use=0.98 | ||
python train.py \ | ||
--model="ResNet34" \ | ||
--pretrained_model="/workspace/models/ResNet34_pretrained" \ | ||
--data="imagenet" \ | ||
--pruned_ratio=0.25 \ | ||
--lr_strategy="cosine_decay" \ | ||
--criterion="geometry_median" \ | ||
--model_path="./fpgm_resnet34_025_120_models" \ | ||
2>&1 | tee fpgm_resnet025_120_train.log |
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,17 @@ | ||
#!/bin/bash | ||
export CUDA_VISIBLE_DEVICES=0,1 | ||
export FLAGS_fraction_of_gpu_memory_to_use=0.98 | ||
python train.py \ | ||
--model="ResNet34" \ | ||
--pretrained_model="/workspace/models/ResNet34_pretrained" \ | ||
--data="imagenet" \ | ||
--pruned_ratio=0.3125 \ | ||
--lr=0.001 \ | ||
--num_epochs=70 \ | ||
--test_period=5 \ | ||
--step_epochs 30 60 \ | ||
--l2_decay=1e-4 \ | ||
--lr_strategy="piecewise_decay" \ | ||
--criterion="geometry_median" \ | ||
--model_path="./fpgm_resnet34_models" \ | ||
2>&1 | tee fpgm_resnet03_train.log |