aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--nerv/examples/swb_baseline.lua1
-rw-r--r--nerv/layer/affine.lua2
2 files changed, 2 insertions, 1 deletions
diff --git a/nerv/examples/swb_baseline.lua b/nerv/examples/swb_baseline.lua
index 8015884..8f72200 100644
--- a/nerv/examples/swb_baseline.lua
+++ b/nerv/examples/swb_baseline.lua
@@ -2,6 +2,7 @@ require 'htk_io'
gconf = {lrate = 0.8, wcost = 1e-6, momentum = 0.9,
cumat_type = nerv.CuMatrixFloat,
mmat_type = nerv.MMatrixFloat,
+ direct_update = true,
frm_ext = 5,
frm_trim = 5,
tr_scp = "/slfs1/users/mfy43/swb_ivec/train_bp.scp",
diff --git a/nerv/layer/affine.lua b/nerv/layer/affine.lua
index 6c90e3e..015ec3f 100644
--- a/nerv/layer/affine.lua
+++ b/nerv/layer/affine.lua
@@ -42,7 +42,7 @@ function AffineLayer:__init(id, global_conf, layer_conf)
self.dim_out = layer_conf.dim_out
self.gconf = global_conf
self:check_dim_len(1, 1) -- exactly one input and one output
- self.direct_update = layer_conf.direct_update
+ self.direct_update = layer_conf.direct_update or global_conf.direct_update
end
function AffineLayer:init(batch_size)