aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortxh18 <[email protected]>2015-11-12 21:49:55 +0800
committertxh18 <[email protected]>2015-11-12 21:49:55 +0800
commit79f5b886dc10c41e5a4b0f26b83c51ca6540ba43 (patch)
treee85935903daadd4951172f5aad703c285ca4854d
parentc56722702c099a6d4b3ea1599836e6226bdccc46 (diff)
added wcost for select_linear layer
-rw-r--r--nerv/examples/lmptb/lmptb/layer/select_linear.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/nerv/examples/lmptb/lmptb/layer/select_linear.lua b/nerv/examples/lmptb/lmptb/layer/select_linear.lua
index efbaf20..672b7e2 100644
--- a/nerv/examples/lmptb/lmptb/layer/select_linear.lua
+++ b/nerv/examples/lmptb/lmptb/layer/select_linear.lua
@@ -37,6 +37,7 @@ function SL:update(bp_err, input, output)
-- end
--end
self.ltp.trans:update_select_rows(bp_err[1], input[1]:trans(), - self.gconf.lrate / self.gconf.batch_size, 0)
+ self.ltp.trans:add(self.ltp.trans, self.ltp.trans, 1.0, - self.gconf.lrate * self.gconf.wcost / self.gconf.batch_size)
end
function SL:propagate(input, output)