Skip to content

Commit

Permalink
added features for guided hcgs
Browse files Browse the repository at this point in the history
  • Loading branch information
razor1179 committed May 1, 2019
1 parent 8f16e53 commit a528c1e
Show file tree
Hide file tree
Showing 11 changed files with 570 additions and 228 deletions.
328 changes: 161 additions & 167 deletions .idea/workspace.xml

Large diffs are not rendered by default.

37 changes: 24 additions & 13 deletions cfg/TIMIT_CGS/TIMIT_LSTM_fmllr.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@ cfg_proto_chunk = proto/global_chunk.proto
[exp]
cmd =
run_nn_script = run_nn
out_folder = exp/TIMIT_LSTM_fmllr_test2_prune87p5pc
seed = 2234
out_folder = exp/TIMIT_LSTM_fmllr_test2_prune81p25
seed = 22341
use_cuda = True
multi_gpu = False
save_gpumem = False
n_epochs_tr = 8
apply_guided_ep = 10

[dataset1]
data_name = TIMIT_tr
Expand Down Expand Up @@ -129,7 +130,7 @@ batch_size_valid = 8
max_seq_length_valid = 1000

[architecture1]
arch_name = LSTM_cudnn_layers
arch_name = LSTM_layers
arch_proto = proto/LSTM.proto
arch_library = neural_networks
arch_class = LSTM
Expand All @@ -143,7 +144,8 @@ lstm_use_batchnorm_inp = False
lstm_use_laynorm = False,False
lstm_use_batchnorm = True,True
lstm_bidir = False
lstm_act = tanh,tanh
lstm_act = htanh,htanh
if_hsigmoid = True
lstm_orthinit = True
arch_lr = 0.0016
arch_halving_factor = 0.5
Expand All @@ -156,16 +158,19 @@ opt_centered = False
opt_weight_decay = 0.0
out_folder =
lstm_hcgs = False
hcgsx_block = 32,4
hcgsx_sparse = 75,62.5
hcgsh_block = 32,4
hcgsh_sparse = 75,62.5
guided_hcgs = False
apply_guided_hcgs = False
hcgsx_block = 64,8
hcgsx_sparse = 25,75
hcgsh_block = 64,8
hcgsh_sparse = 25,75
lstm_quant = False
param_quant = 6,6
lstm_quant_inp = False
inp_quant = 13
lstm_prune = True
lstm_prune_perc = 87.5
lstm_prune_perc = 81.25
skip_regularization = True

[architecture2]
arch_name = MLP_layers
Expand Down Expand Up @@ -193,14 +198,17 @@ opt_centered = False
opt_weight_decay = 0.0
out_folder =
mlp_hcgs = False
hcgs_block = 64,4
hcgs_sparse = 50,25
guided_hcgs = False
apply_guided_hcgs = False
hcgs_block = 64,8
hcgs_sparse = 25,75
mlp_quant = False
param_quant = 5
mlp_quant_inp = False
inp_quant = 13
mlp_prune = True
mlp_prune_perc = 87.5
mlp_prune_perc = 81.25
skip_regularization = True

[architecture3]
arch_name = MLP_layers2
Expand Down Expand Up @@ -228,6 +236,8 @@ opt_centered = False
opt_weight_decay = 0.0
out_folder =
mlp_hcgs = False
guided_hcgs = False
apply_guided_hcgs = False
hcgs_block = 64,4
hcgs_sparse = 50,25
mlp_quant = False
Expand All @@ -236,10 +246,11 @@ mlp_quant_inp = False
inp_quant = 13
mlp_prune = False
mlp_prune_perc = 70
skip_regularization = True

[model]
model_proto = proto/model.proto
model = out_dnn1=compute(LSTM_cudnn_layers,fmllr)
model = out_dnn1=compute(LSTM_layers,fmllr)
out_dnn2=compute(MLP_layers,out_dnn1)
out_dnn3=compute(MLP_layers2,out_dnn1)
loss_mono=cost_nll(out_dnn3,lab_mono)
Expand Down
39 changes: 25 additions & 14 deletions cfg/TIMIT_CGS/TIMIT_LSTM_fmllr_L1.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@ cfg_proto_chunk = proto/global_chunk.proto
[exp]
cmd =
run_nn_script = run_nn
out_folder = exp/TIMIT_LSTM_fmllr_test_l1
seed = 2234
out_folder = exp/TIMIT_LSTM_fmllr_test2_l1_prune81p25
seed = 22341
use_cuda = True
multi_gpu = False
save_gpumem = False
n_epochs_tr = 8
apply_guided_ep = 1

[dataset1]
data_name = TIMIT_tr
Expand Down Expand Up @@ -129,7 +130,7 @@ batch_size_valid = 8
max_seq_length_valid = 1000

[architecture1]
arch_name = LSTM_cudnn_layers
arch_name = LSTM_layers
arch_proto = proto/LSTM.proto
arch_library = neural_networks
arch_class = LSTM
Expand All @@ -143,7 +144,8 @@ lstm_use_batchnorm_inp = False
lstm_use_laynorm = False,False
lstm_use_batchnorm = True,True
lstm_bidir = False
lstm_act = tanh,tanh
lstm_act = htanh,htanh
if_hsigmoid = True
lstm_orthinit = True
arch_lr = 0.0016
arch_halving_factor = 0.5
Expand All @@ -156,16 +158,19 @@ opt_centered = False
opt_weight_decay = 0.0
out_folder =
lstm_hcgs = False
hcgsx_block = 32,4
hcgsx_sparse = 75,62.5
hcgsh_block = 32,4
hcgsh_sparse = 75,62.5
guided_hcgs = False
apply_guided_hcgs = False
hcgsx_block = 8
hcgsx_sparse = 81.25
hcgsh_block = 8
hcgsh_sparse = 81.25
lstm_quant = False
param_quant = 6,6
lstm_quant_inp = False
inp_quant = 13
lstm_prune = True
lstm_prune_perc = 70
lstm_prune_perc = 81.25
skip_regularization = False

[architecture2]
arch_name = MLP_layers
Expand Down Expand Up @@ -193,14 +198,17 @@ opt_centered = False
opt_weight_decay = 0.0
out_folder =
mlp_hcgs = False
hcgs_block = 64,4
hcgs_sparse = 50,25
guided_hcgs = False
apply_guided_hcgs = False
hcgs_block = 8
hcgs_sparse = 81.25
mlp_quant = False
param_quant = 5
mlp_quant_inp = False
inp_quant = 13
mlp_prune = True
mlp_prune_perc = 70
mlp_prune_perc = 81.25
skip_regularization = False

[architecture3]
arch_name = MLP_layers2
Expand Down Expand Up @@ -228,6 +236,8 @@ opt_centered = False
opt_weight_decay = 0.0
out_folder =
mlp_hcgs = False
guided_hcgs = False
apply_guided_hcgs = False
hcgs_block = 64,4
hcgs_sparse = 50,25
mlp_quant = False
Expand All @@ -236,16 +246,17 @@ mlp_quant_inp = False
inp_quant = 13
mlp_prune = False
mlp_prune_perc = 70
skip_regularization = True

[model]
model_proto = proto/model.proto
model = out_dnn1=compute(LSTM_cudnn_layers,fmllr)
model = out_dnn1=compute(LSTM_layers,fmllr)
out_dnn2=compute(MLP_layers,out_dnn1)
out_dnn3=compute(MLP_layers2,out_dnn1)
loss_mono=cost_nll(out_dnn3,lab_mono)
loss_mono_w=mult_constant(loss_mono,1.0)
loss_cd=cost_nll(out_dnn2,lab_cd)
loss_l1=cost_l1(out_dnn2,0.001)
loss_l1=cost_l1(out_dnn2,0.000008)
loss_cd_l1=sum(loss_l1,loss_cd)
loss_final=sum(loss_cd_l1,loss_mono_w)
err_final=cost_err(out_dnn2,lab_cd)
Expand Down
13 changes: 7 additions & 6 deletions cfg/TIMIT_CGS/TIMIT_LSTM_fmllr_ghcgs.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ cfg_proto_chunk = proto/global_chunk.proto
[exp]
cmd =
run_nn_script = run_nn
out_folder = exp/TIMIT_LSTM_fmllr_test_ghcgs_25d64b_75d8b
seed = 2234
out_folder = exp/TIMIT_LSTM_fmllr_test2_ghcgs_25d32b_75d4b
seed = 22341
use_cuda = True
multi_gpu = False
save_gpumem = False
Expand Down Expand Up @@ -145,6 +145,7 @@ lstm_use_laynorm = False,False
lstm_use_batchnorm = True,True
lstm_bidir = False
lstm_act = htanh,htanh
if_hsigmoid = True
lstm_orthinit = True
arch_lr = 0.0016
arch_halving_factor = 0.5
Expand All @@ -159,9 +160,9 @@ out_folder =
lstm_hcgs = False
guided_hcgs = True
apply_guided_hcgs = False
hcgsx_block = 64,8
hcgsx_block = 32,4
hcgsx_sparse = 25,75
hcgsh_block = 64,8
hcgsh_block = 32,4
hcgsh_sparse = 25,75
lstm_quant = False
param_quant = 6,6
Expand Down Expand Up @@ -199,7 +200,7 @@ out_folder =
mlp_hcgs = False
guided_hcgs = True
apply_guided_hcgs = False
hcgs_block = 64,8
hcgs_block = 32,4
hcgs_sparse = 25,75
mlp_quant = False
param_quant = 5
Expand Down Expand Up @@ -255,7 +256,7 @@ model = out_dnn1=compute(LSTM_layers,fmllr)
loss_mono=cost_nll(out_dnn3,lab_mono)
loss_mono_w=mult_constant(loss_mono,1.0)
loss_cd=cost_nll(out_dnn2,lab_cd)
loss_gl=cost_gl(out_dnn2,0.0002,16)
loss_gl=cost_gl(out_dnn2,0.0002,32)
loss_cd_gl=sum(loss_gl,loss_cd)
loss_final=sum(loss_cd_gl,loss_mono_w)
err_final=cost_err(out_dnn2,lab_cd)
Expand Down
Loading

0 comments on commit a528c1e

Please sign in to comment.