diff options
author | Determinant <[email protected]> | 2015-10-09 18:42:09 +0800 |
---|---|---|
committer | Determinant <[email protected]> | 2015-10-09 18:42:09 +0800 |
commit | bd6d0d8b72ec656dd8fa0c13aa602f4f6e022391 (patch) | |
tree | 2ff5f55c1b813c7fc1a043252070ee6c5f08adba | |
parent | 3721c74d56ffdea43851489617f33cd13b87ab76 (diff) |
enable user to set direct_update in gconf; use direct_update in the example
-rw-r--r-- | nerv/examples/swb_baseline.lua | 1 | ||||
-rw-r--r-- | nerv/layer/affine.lua | 2 |
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 00cbcfb..b81b2a4 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) |