diff options
author | Determinant <[email protected]> | 2016-03-11 20:09:06 +0800 |
---|---|---|
committer | Determinant <[email protected]> | 2016-03-11 20:09:06 +0800 |
commit | 54b33aa3a95f5a7a023e9ea453094ae081c91f64 (patch) | |
tree | 7d170d45566aad6803c4949cf4ec144b584b580d /speech_utils/init.lua | |
parent | 046d6d30b88462407c4acde3d7c47e94ef083b94 (diff) |
adapt to new network architecture
Diffstat (limited to 'speech_utils/init.lua')
-rw-r--r-- | speech_utils/init.lua | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/speech_utils/init.lua b/speech_utils/init.lua index 9e8adba..0b65edc 100644 --- a/speech_utils/init.lua +++ b/speech_utils/init.lua @@ -1,13 +1,18 @@ nerv.speech_utils = {} -function nerv.speech_utils.global_transf(feat_utter, global_transf, +function nerv.speech_utils.global_transf(feat_utter, network, frm_ext, frm_trim, gconf) -- prepare for transf local input = {feat_utter} local output = {feat_utter:create()} -- do transf - global_transf:init(input[1]:nrow()) - global_transf:propagate(input, output) + local batch_size = input[1]:nrow() + network:mini_batch_init({seq_length = table.vector(batch_size, 1), + new_seq = {}, + do_train = false, + input = {input}, + output = {output}}) + network:propagate() -- trim frames if gconf.use_cpu then mat_type = gconf.mmat_type |