Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
mravanelli committed Jul 27, 2018
1 parent 092f098 commit 175cf80
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 10 deletions.
5 changes: 1 addition & 4 deletions data_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@ def read_conf():
options.cnn_use_batchnorm=Config.get('cnn', 'cnn_use_batchnorm')
options.cnn_act=Config.get('cnn', 'cnn_act')
options.cnn_drop=Config.get('cnn', 'cnn_drop')
options.cnn_init_first=Config.get('cnn', 'cnn_init_first')
options.cnn_init_gain=Config.get('cnn', 'cnn_init_gain')


#[dnn]
options.fc_lay=Config.get('dnn', 'fc_lay')
Expand All @@ -75,8 +74,6 @@ def read_conf():
options.N_epochs=Config.get('optimization', 'N_epochs')
options.N_batches=Config.get('optimization', 'N_batches')
options.N_eval_epoch=Config.get('optimization', 'N_eval_epoch')
options.reg_factor=Config.get('optimization', 'reg_factor')
options.fact_amp=Config.get('optimization', 'fact_amp')
options.seed=Config.get('optimization', 'seed')

return options
Expand Down
Binary file added data_io.pyc
Binary file not shown.
2 changes: 0 additions & 2 deletions dnn_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,6 @@ def __init__(self,options):
self.cnn_len_filt=options['cnn_len_filt']
self.cnn_max_pool_len=options['cnn_max_pool_len']

self.cnn_init_first=options['cnn_init_first']
self.cnn_init_gain=options['cnn_init_gain']

self.cnn_act=options['cnn_act']
self.cnn_drop=options['cnn_drop']
Expand Down
Binary file added dnn_models.pyc
Binary file not shown.
Binary file added exp/SincNet_TIMIT/model_raw.pkl
Binary file not shown.
2 changes: 2 additions & 0 deletions exp/SincNet_TIMIT/res.res
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
epoch 0, loss_tr=6.324174 err_tr=0.997500 loss_te=6.295551 err_te=0.997505 err_te_snt=0.997836
epoch 25, loss_tr=3.206195 err_tr=0.748750 loss_te=3.695170 err_te=0.814129 err_te_snt=0.409812
6 changes: 2 additions & 4 deletions speaker_id.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,7 @@ def create_batches_rnd(batch_size,data_folder,wav_lst,N_snt,wlen,lab_dict,fact_a
'cnn_use_laynorm':cnn_use_laynorm,
'cnn_use_batchnorm':cnn_use_batchnorm,
'cnn_act': cnn_act,
'cnn_drop':cnn_drop,
'cnn_init_first':cnn_init_first,
'cnn_init_gain':cnn_init_gain,
'cnn_drop':cnn_drop,
}

CNN_net=CNN(CNN_arch)
Expand Down Expand Up @@ -226,7 +224,7 @@ def create_batches_rnd(batch_size,data_folder,wav_lst,N_snt,wlen,lab_dict,fact_a

for i in range(N_batches):

[inp,lab]=create_batches_rnd(batch_size,data_folder,wav_lst_tr,snt_tr,wlen,lab_dict,fact_amp)
[inp,lab]=create_batches_rnd(batch_size,data_folder,wav_lst_tr,snt_tr,wlen,lab_dict,0.2)
pout=DNN2_net(DNN1_net(CNN_net(inp)))

pred=torch.max(pout,dim=1)[1]
Expand Down

0 comments on commit 175cf80

Please sign in to comment.