diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index f8a3ac25..e6cf8a4a 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -3,16 +3,9 @@
-
-
-
-
-
-
-
@@ -29,7 +22,7 @@
-
+
@@ -41,8 +34,8 @@
-
-
+
+
@@ -53,7 +46,7 @@
-
+
@@ -65,8 +58,8 @@
-
-
+
+
@@ -77,17 +70,29 @@
-
+
-
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -104,8 +109,8 @@
-
-
+
+
@@ -121,8 +126,6 @@
- self.size_per_dir
- rand_choices
class LSTM(
ghcgs_uih
guided
@@ -150,7 +153,9 @@
class lstm
nn_class
gl_norm
+ prune
nns
+ apply_
30.0
@@ -189,17 +194,17 @@
-
-
-
+
+
+
-
+
@@ -212,6 +217,7 @@
+
@@ -234,7 +240,6 @@
-
@@ -358,8 +363,7 @@
-
-
+
@@ -514,20 +518,8 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
@@ -669,16 +661,6 @@
-
-
-
-
-
-
-
-
-
-
@@ -699,71 +681,81 @@
-
-
-
-
-
-
-
-
+
-
-
+
+
+
+
+
-
+
-
-
+
+
-
+
-
+
-
-
+
+
-
+
-
+
-
+
-
-
-
-
-
+
+
-
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
+
-
-
+
+
+
+
+
diff --git a/cfg/TIMIT_CGS/TIMIT_LSTM_fmllr_ghcgs.cfg b/cfg/TIMIT_CGS/TIMIT_LSTM_fmllr_ghcgs.cfg
index 4e823820..bc522b6f 100644
--- a/cfg/TIMIT_CGS/TIMIT_LSTM_fmllr_ghcgs.cfg
+++ b/cfg/TIMIT_CGS/TIMIT_LSTM_fmllr_ghcgs.cfg
@@ -5,13 +5,13 @@ cfg_proto_chunk = proto/global_chunk.proto
[exp]
cmd =
run_nn_script = run_nn
-out_folder = exp/TIMIT_LSTM_fmllr_test2_ghcgs_onlyFinal_25d32b_75d4b
+out_folder = exp/TIMIT_LSTM_fmllr_test2_gcgs_onlyFirst_81p25d32b
seed = 22341
use_cuda = True
multi_gpu = False
save_gpumem = False
n_epochs_tr = 8
-apply_guided_ep = 8
+apply_guided_ep = 2
[dataset1]
data_name = TIMIT_tr
@@ -160,10 +160,10 @@ out_folder =
lstm_hcgs = False
guided_hcgs = True
apply_guided_hcgs = False
-hcgsx_block = 32,4
-hcgsx_sparse = 25,75
-hcgsh_block = 32,4
-hcgsh_sparse = 25,75
+hcgsx_block = 32
+hcgsx_sparse = 81.25
+hcgsh_block = 32
+hcgsh_sparse = 81.25
lstm_quant = False
param_quant = 6,6
lstm_quant_inp = False
@@ -200,8 +200,8 @@ out_folder =
mlp_hcgs = False
guided_hcgs = True
apply_guided_hcgs = False
-hcgs_block = 32,4
-hcgs_sparse = 25,75
+hcgs_block = 32
+hcgs_sparse = 81.25
mlp_quant = False
param_quant = 5
mlp_quant_inp = False
diff --git a/cfg/TIMIT_CGS/TIMIT_LSTM_fmllr_ghcgs_L1.cfg b/cfg/TIMIT_CGS/TIMIT_LSTM_fmllr_ghcgs_L1.cfg
index ccf7a2ff..aa73a35e 100644
--- a/cfg/TIMIT_CGS/TIMIT_LSTM_fmllr_ghcgs_L1.cfg
+++ b/cfg/TIMIT_CGS/TIMIT_LSTM_fmllr_ghcgs_L1.cfg
@@ -5,13 +5,13 @@ cfg_proto_chunk = proto/global_chunk.proto
[exp]
cmd =
run_nn_script = run_nn
-out_folder = exp/TIMIT_LSTM_fmllr_test_ghcgs_l1_onlyFinal_25d32b_75d4b
-seed = 2234
+out_folder = exp/TIMIT_LSTM_fmllr_test2_ghcgs_l1_onlyFirst_25d32b_75d4b
+seed = 22341
use_cuda = True
multi_gpu = False
save_gpumem = False
n_epochs_tr = 8
-apply_guided_ep = 8
+apply_guided_ep = 2
[dataset1]
data_name = TIMIT_tr
diff --git a/guided_choices.py b/guided_choices.py
index 8ea4a823..f7001556 100644
--- a/guided_choices.py
+++ b/guided_choices.py
@@ -18,7 +18,7 @@ def guided_array_rows (w_mat, n_blk, n_blk_sels, blk_size):
w_mat2 = w_mat[: ,x:x + c1]
temp = torch.randn(1, 1, r, c1)
temp[0, 0, :, :] = w_mat2
- if r == blk_size:
+ if r == blk_size and c1 >= blk_size:
avg = torch.nn.AvgPool2d(blk_size, c1)
else:
avg = torch.nn.AvgPool2d((r, c1), c1)
diff --git a/utils.py b/utils.py
index e6032b42..ba5a4307 100644
--- a/utils.py
+++ b/utils.py
@@ -1898,7 +1898,7 @@ def forward_model(fea_dict, lab_dict, arch_dict, model, nns, costs, inp, inp_out
for line in model:
[out_name, operation, inp1, inp2] = list(re.findall(pattern, line)[0])
- if out_name == 'loss_gl':
+ if out_name[0:7] == 'loss_gl':
pattern2 = '(.*)=(.*)\((.*),(.*),(.*)\)'
[out_name, operation, inp1, inp2, inp3] = list(re.findall(pattern2, line)[0])