summaryrefslogtreecommitdiff
path: root/speech_utils
diff options
context:
space:
mode:
Diffstat (limited to 'speech_utils')
-rw-r--r--speech_utils/init.lua11
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