aboutsummaryrefslogtreecommitdiff
path: root/examples/asr_trainer.lua
diff options
context:
space:
mode:
authorDeterminant <[email protected]>2015-06-07 21:59:10 +0800
committerDeterminant <[email protected]>2015-06-07 21:59:10 +0800
commit0f30b1a4b5e583cb1df7dbb349c1af4378e41369 (patch)
tree967c6326b83cda2b92eee5f597dde0e74b071dbb /examples/asr_trainer.lua
parent6e720b961f7edac9c3a41affe0ca40dd0ec9fc85 (diff)
fix minor bugs in cumatrix; clean up part of code
Diffstat (limited to 'examples/asr_trainer.lua')
-rw-r--r--examples/asr_trainer.lua7
1 files changed, 5 insertions, 2 deletions
diff --git a/examples/asr_trainer.lua b/examples/asr_trainer.lua
index 2993192..05d770f 100644
--- a/examples/asr_trainer.lua
+++ b/examples/asr_trainer.lua
@@ -33,6 +33,7 @@ function build_trainer(ifname)
collectgarbage("collect")
end
print_stat(crit)
+ nerv.CuMatrix.print_profile()
if (not bp) and prefix ~= nil then
nerv.info("writing back...")
local fname = string.format("%s_cv%.3f.nerv",
@@ -71,7 +72,9 @@ for i = 1, max_iter do
nerv.info("[TR] training set %d: %.3f", i, accu_tr)
local accu_new = trainer(
string.format("%s_%s_iter_%d_lr%f_tr%.3f",
- string.gsub(pf0, "(.*/)(.*)%..*", "%2"),
+ string.gsub(
+ (string.gsub(pf0, "(.*/)(.*)", "%2")),
+ "(.*)%..*", "%1"),
os.date("%Y%m%d%H%M%S"),
i, gconf.lrate,
accu_tr),
@@ -91,5 +94,5 @@ for i = 1, max_iter do
if accu_new > accu_best then
accu_best = accu_new
end
- nerv.Matrix.print_profile()
+-- nerv.Matrix.print_profile()
end