Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
c5e7fa6
smart ratio v3 init
jysohn1108 Feb 4, 2022
0f8328e
srV3 implement (for tuning sr)
jysohn1108 Feb 4, 2022
542ffb2
srV3 tuning pruning ratio
jysohn1108 Feb 4, 2022
940211c
fixing pt_sr
ksreenivasan Feb 4, 2022
a2072b2
minor bugfixes
ksreenivasan Feb 4, 2022
ab7b5db
added projection steps
ksreenivasan Feb 4, 2022
eeb828a
fixing up the exec script again
ksreenivasan Feb 4, 2022
879f7be
debug
jysohn1108 Feb 7, 2022
f1489c4
Merge branch 'pt_sr' of https://github.com/ksreenivasan/pruning_is_en…
jysohn1108 Feb 7, 2022
f1ce43e
SRv3 training p & running the tuned ratio
jysohn1108 Feb 8, 2022
ad00b7a
SRv3 save/load, SRv4
jysohn1108 Feb 8, 2022
70d0f22
per layer sparsity for trained one
jysohn1108 Feb 9, 2022
6152409
SRv3 using the trained score
jysohn1108 Feb 12, 2022
1b20faf
grid search for smart ratio
jysohn1108 Feb 12, 2022
51c61d2
split for parallel running
jysohn1108 Feb 12, 2022
fafbf90
smart ratio grid search
jysohn1108 Feb 12, 2022
40fa2d9
indent
jysohn1108 Feb 12, 2022
f434de9
smart ratio grid
jysohn1108 Feb 12, 2022
31a6fba
sr grid done
jysohn1108 Feb 12, 2022
20c2c81
grid search result gather
jysohn1108 Feb 14, 2022
2ec8c70
grid search
jysohn1108 Feb 15, 2022
44616a2
Merge branch 'pt_sr' of https://github.com/ksreenivasan/pruning_is_en…
jysohn1108 Feb 15, 2022
a452041
grid search near GM model
jysohn1108 Feb 15, 2022
c4367e2
grid search V5, and V6 init
jysohn1108 Feb 20, 2022
69e4f4a
Merge branch 'pt_sr' of https://github.com/ksreenivasan/pruning_is_en…
jysohn1108 Feb 20, 2022
ac594c5
set IMP ratio as the starting point for the grid search
jysohn1108 Feb 20, 2022
00a6084
changes
jysohn1108 Feb 21, 2022
a907524
srV6 re-run
jysohn1108 Feb 28, 2022
9bf119c
comment srv6
jysohn1108 Feb 28, 2022
9e3b354
resnet18, cifar10 config file for GM
jysohn1108 Feb 28, 2022
bd47463
srvN for resent20, gm/sr for resnet18
jysohn1108 Feb 28, 2022
5d29da2
merge
jysohn1108 Feb 28, 2022
6b4bcb6
merge
jysohn1108 Feb 28, 2022
41a1bac
sanity check for cifar10, resnet18, gm
jysohn1108 Mar 1, 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
435 changes: 173 additions & 262 deletions SmartRatio.py

Large diffs are not rendered by default.

31 changes: 31 additions & 0 deletions args_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -904,6 +904,37 @@ def parse_arguments(self, jupyter_mode=False):
type=int,
help="smart ratio version number (1, 2, ...)",
)
parser.add_argument(
"--srV3-epoch",
default=160,
type=int,
help="number of intermediate epochs used for loading srV3",
)
parser.add_argument(
"--sr_seq",
default=None,
type=str,
help="sequence to test for smart ratio",
)

'''
parser.add_argument(
"--current-layer",
default=0,
type=int,
help="current layer index",
)
'''
# parser.add_argument(
# "--pt-sr-init",
# type=list,
# default=[],
# nargs="+",
# metavar="M",
# help="List of initial sparsity pattern for pt-sr (resnet20)"
# )



if jupyter_mode:
args = parser.parse_args("")
Expand Down
24 changes: 12 additions & 12 deletions cifar_exec.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,21 +64,21 @@ BLOCK

# Running trials in parallel
# NOTE: make sure to delete/comment subfolder from the config file or else it may not work
conf_file="configs/hypercube/wideresnet28/wideresnet28_weight_training.yml"
log_root="wideresnet28_"
conf_file="configs/sr/resnet20/resnet20_find_srV3.yml"
log_root="pt_sr_debug_"
log_end="_log"
subfolder_root="wideresnet28_results_trial_"
subfolder_root="pt_sr_debug_"

for trial in 2 3
for trial in 1
do
python main.py \
--config "$conf_file" \
--trial-num $trial \
--subfolder "$subfolder_root$trial" > "$log_root$trial$log_end" 2>&1 &

python main.py \
--config "$conf_file" \
--trial-num $trial \
--invert-sanity-check \
--subfolder "invert_$subfolder_root$trial" > "invert_$log_root$trial$log_end" 2>&1 &
done
--subfolder "$subfolder_root$trial" > "$log_root$trial$log_end" 2>&1

# python main.py \
# --config "$conf_file" \
# --trial-num $trial \
# --invert-sanity-check \
# --subfolder "invert_$subfolder_root$trial" > "invert_$log_root$trial$log_end" 2>&1 &
done
Loading