From 79f5b886dc10c41e5a4b0f26b83c51ca6540ba43 Mon Sep 17 00:00:00 2001 From: txh18 Date: Thu, 12 Nov 2015 21:49:55 +0800 Subject: added wcost for select_linear layer --- nerv/examples/lmptb/lmptb/layer/select_linear.lua | 1 + 1 file changed, 1 insertion(+) 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) -- cgit v1.2.3-70-g09d2