Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
4d88d58
add mobilenet tiny exec file
Leiay Feb 27, 2022
5c6b621
resolve change
Leiay Feb 28, 2022
b7679b4
modify imp setting for cresnet18
Leiay Feb 28, 2022
b34e87a
finetune the hyperparameter
Mar 1, 2022
1054528
Merge branch 'tiny_mobile' of https://github.com/ksreenivasan/pruning…
Mar 1, 2022
ef98645
run mobilenet tinyimagenet GM
jysohn1108 Mar 12, 2022
f79502f
tinyimagenet, mobielnetV2, sgd, weight training
jysohn1108 Mar 13, 2022
a278212
mobilenetV2, tinyimgnet, weight training
jysohn1108 Mar 15, 2022
67b130f
hypercube mobilenet tinyimgnet yml file
jysohn1108 Mar 17, 2022
66f140a
run GM/SR for tinyimgnet, mobilenetv2
jysohn1108 Mar 17, 2022
004f246
add arguments for handling fine-tune-lr-gamma, let fine-tune-gamma ap…
jysohn1108 Mar 21, 2022
b12e393
run tiny, mobile for imp/renda/sr/ep/hc
jysohn1108 Mar 21, 2022
4ffa88c
run sanity check for 1.4% GM, tiny, mobile
jysohn1108 Mar 29, 2022
d40a141
run sr for tiny, mobilenet
jysohn1108 Mar 29, 2022
83b3665
Merge branch 'tiny_mobile' of https://github.com/ksreenivasan/pruning…
jysohn1108 Mar 29, 2022
17447b4
sanity checks for tiny, mobilenet, gm
jysohn1108 Mar 29, 2022
8d1b80d
sanity check yml, tiny mobile
jysohn1108 Mar 29, 2022
9af6438
Merge branch 'tiny_mobile' of https://github.com/ksreenivasan/pruning…
jysohn1108 Mar 29, 2022
d333744
invert, tiny, mobile, gm
jysohn1108 Mar 29, 2022
c905c46
debugging tiny, mobile
jysohn1108 Mar 31, 2022
5a3174f
Merge branch 'tiny_mobile' of https://github.com/ksreenivasan/pruning…
jysohn1108 Mar 31, 2022
9b39ad3
renda, tiny, mobilenet
jysohn1108 Apr 21, 2022
078e65a
comment
jysohn1108 Apr 27, 2022
44e60e0
Merge branch 'tiny_mobile' of https://github.com/ksreenivasan/pruning…
jysohn1108 Apr 27, 2022
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: 6 additions & 0 deletions args_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -742,6 +742,12 @@ def parse_arguments(self, jupyter_mode=False):
metavar="LR",
help="Learning rate for fine-tuning weights"
)
parser.add_argument(
"--fine-tune-lr-gamma",
type=float,
default=0.1,
help="Learning rate decay for multi-step"
)
parser.add_argument(
"--fine-tune-wd",
type=float,
Expand Down
43 changes: 43 additions & 0 deletions configs/ep/tinyImageNet/mobilenetV2/sparsity_1_4.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#subfolder: EP_sparsity_1_4
algo: 'ep'
override_prune_rate: True

# Architecture
arch: tinyMobileNetV2

# ===== Dataset ===== #
dataset: TinyImageNet
name: mobileV2_tiny

# ===== Learning Rate Policy ======== #
optimizer: sgd
lr: 0.1
lr_policy: cosine_lr
fine_tune_lr: 0.1
fine_tune_lr_policy: multistep_lr

# ===== Network training config ===== #
epochs: 300
fine_tune_wd: 0.00004
momentum: 0.9
batch_size: 128 #256

# ===== Sparsity =========== #
conv_type: SubnetConv
bn_type: NonAffineBatchNorm
init: signed_constant
mode: fan_in
nonlinearity: relu
prune_rate: 0.014
scale_fan: True
freeze_weights: True

# ===== Hardware setup ===== #
workers: 4
#gpu: 0

# ===== Checkpointing ===== #
checkpoint_at_prune: False

# ==== sanity check ==== #
skip_sanity_checks: True
43 changes: 43 additions & 0 deletions configs/ep/tinyImageNet/mobilenetV2/sparsity_20.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#subfolder: EP_sparsity_20
algo: 'ep'
override_prune_rate: True

# Architecture
arch: tinyMobileNetV2

# ===== Dataset ===== #
dataset: TinyImageNet
name: mobileV2_tiny

# ===== Learning Rate Policy ======== #
optimizer: sgd
lr: 0.1
lr_policy: cosine_lr
fine_tune_lr: 0.1
fine_tune_lr_policy: multistep_lr

# ===== Network training config ===== #
epochs: 300
fine_tune_wd: 0.00004
momentum: 0.9
batch_size: 128 #256

# ===== Sparsity =========== #
conv_type: SubnetConv
bn_type: NonAffineBatchNorm
init: signed_constant
mode: fan_in
nonlinearity: relu
prune_rate: 0.20
scale_fan: True
freeze_weights: True

# ===== Hardware setup ===== #
workers: 4
#gpu: 0

# ===== Checkpointing ===== #
checkpoint_at_prune: False

# ==== sanity check ==== #
skip_sanity_checks: True
43 changes: 43 additions & 0 deletions configs/ep/tinyImageNet/mobilenetV2/sparsity_5.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#subfolder: EP_sparsity_5
algo: 'ep'
override_prune_rate: True

# Architecture
arch: tinyMobileNetV2

# ===== Dataset ===== #
dataset: TinyImageNet
name: mobileV2_tiny

# ===== Learning Rate Policy ======== #
optimizer: sgd
lr: 0.1
lr_policy: cosine_lr
fine_tune_lr: 0.1
fine_tune_lr_policy: multistep_lr

# ===== Network training config ===== #
epochs: 300
fine_tune_wd: 0.00004
momentum: 0.9
batch_size: 128 #256

# ===== Sparsity =========== #
conv_type: SubnetConv
bn_type: NonAffineBatchNorm
init: signed_constant
mode: fan_in
nonlinearity: relu
prune_rate: 0.05
scale_fan: True
freeze_weights: True

# ===== Hardware setup ===== #
workers: 4
#gpu: 0

# ===== Checkpointing ===== #
checkpoint_at_prune: False

# ==== sanity check ==== #
skip_sanity_checks: True
43 changes: 43 additions & 0 deletions configs/ep/tinyImageNet/mobilenetV2/sparsity_5_adam.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#subfolder: EP_sparsity_5
algo: 'ep'
override_prune_rate: True

# Architecture
arch: tinyMobileNetV2

# ===== Dataset ===== #
dataset: TinyImageNet
name: mobileV2_tiny

# ===== Learning Rate Policy ======== #
optimizer: adam
lr: 0.001
lr_policy: cosine_lr
fine_tune_lr: 0.1
fine_tune_lr_policy: multistep_lr

# ===== Network training config ===== #
epochs: 300
fine_tune_wd: 0.00004
momentum: 0.9
batch_size: 128 #256

# ===== Sparsity =========== #
conv_type: SubnetConv
bn_type: NonAffineBatchNorm
init: signed_constant
mode: fan_in
nonlinearity: relu
prune_rate: 0.05
scale_fan: True
freeze_weights: True

# ===== Hardware setup ===== #
workers: 4
#gpu: 0

# ===== Checkpointing ===== #
checkpoint_at_prune: False

# ==== sanity check ==== #
skip_sanity_checks: True
62 changes: 62 additions & 0 deletions configs/hypercube/tinyImageNet/mobilenetV2/adam.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
#subfolder: tiny_mobilenetV2_hc_sparsity_1_4
trial_num: 1

# Hypercube optimization
algo: 'hc_iter'
iter_period: 5

# Architecture
arch: tinyMobileNetV2

# ===== Dataset ===== #
dataset: TinyImageNet
name: mobilenetV2_hc

# ===== Learning Rate Policy ======== #
optimizer: adam
lr: 0.001 #0.01
wd: 0.0
lr_policy: cosine_lr #constant_lr #multistep_lr
fine_tune_lr: 0.1
fine_tune_lr_policy: multistep_lr

# ===== Network training config ===== #
epochs: 300 #300
fine_tune_wd: 0.00004
momentum: 0.9
batch_size: 128

# ===== Sparsity =========== #
conv_type: SubnetConv
bn_type: NonAffineBatchNorm
freeze_weights: True
prune_type: BottomK
# enter target sparsity here
#target_sparsity: 1.4
unflag_before_finetune: True
init: signed_constant
score_init: unif #skew #half #bimodal #skew # bern
scale_fan: False #True

# ===== Rounding ===== #
round: naive
noise: True
noise_ratio: 0

# ===== Quantization ===== #
hc_quantized: True
quantize_threshold: 0.5

# ===== Regularization ===== #
regularization: L2
#lmbda: 0.000008

# ===== Hardware setup ===== #
workers: 4
#gpu: 0

# ===== Checkpointing ===== #
checkpoint_at_prune: False

# ==== sanity check ==== #
skip_sanity_checks: True
62 changes: 62 additions & 0 deletions configs/hypercube/tinyImageNet/mobilenetV2/sgd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
#subfolder: tiny_mobilenetV2_hc_sparsity_1_4
trial_num: 1

# Hypercube optimization
algo: 'hc_iter'
iter_period: 5

# Architecture
arch: tinyMobileNetV2

# ===== Dataset ===== #
dataset: TinyImageNet
name: mobilenetV2_hc

# ===== Learning Rate Policy ======== #
optimizer: sgd
lr: 0.1 #0.01
wd: 0.0
lr_policy: cosine_lr #constant_lr #multistep_lr
fine_tune_lr: 0.1
fine_tune_lr_policy: multistep_lr

# ===== Network training config ===== #
epochs: 300 #300
fine_tune_wd: 0.00004
momentum: 0.9
batch_size: 128

# ===== Sparsity =========== #
conv_type: SubnetConv
bn_type: NonAffineBatchNorm
freeze_weights: True
prune_type: BottomK
# enter target sparsity here
#target_sparsity: 1.4
unflag_before_finetune: True
init: signed_constant
score_init: unif #skew #half #bimodal #skew # bern
scale_fan: False #True

# ===== Rounding ===== #
round: naive
noise: True
noise_ratio: 0

# ===== Quantization ===== #
hc_quantized: True
quantize_threshold: 0.5

# ===== Regularization ===== #
regularization: L2
#lmbda: 0.000008

# ===== Hardware setup ===== #
workers: 4
#gpu: 0

# ===== Checkpointing ===== #
checkpoint_at_prune: False

# ==== sanity check ==== #
skip_sanity_checks: True
62 changes: 62 additions & 0 deletions configs/hypercube/tinyImageNet/mobilenetV2/sparsity_1_4.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
subfolder: tiny_mobilenetV2_hc_sparsity_1_4
trial_num: 1

# Hypercube optimization
algo: 'hc_iter'
iter_period: 5

# Architecture
arch: tinyMobileNetV2

# ===== Dataset ===== #
dataset: TinyImageNet
name: mobilenetV2_hc

# ===== Learning Rate Policy ======== #
optimizer: adam
lr: 0.001 #0.01
wd: 0.0
lr_policy: cosine_lr #constant_lr #multistep_lr
fine_tune_lr: 0.1
fine_tune_lr_policy: multistep_lr

# ===== Network training config ===== #
epochs: 300 #300
fine_tune_wd: 0.00004
momentum: 0.9
batch_size: 128

# ===== Sparsity =========== #
conv_type: SubnetConv
bn_type: NonAffineBatchNorm
freeze_weights: True
prune_type: BottomK
# enter target sparsity here
target_sparsity: 1.4
unflag_before_finetune: True
init: signed_constant
score_init: unif #skew #half #bimodal #skew # bern
scale_fan: False #True

# ===== Rounding ===== #
round: naive
noise: True
noise_ratio: 0

# ===== Quantization ===== #
hc_quantized: True
quantize_threshold: 0.5

# ===== Regularization ===== #
regularization: L2
lmbda: 0.000008

# ===== Hardware setup ===== #
workers: 4
gpu: 0

# ===== Checkpointing ===== #
checkpoint_at_prune: True

# ==== sanity check ==== #
skip_sanity_checks: True
Loading