aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormfy43 <[email protected]>2016-05-05 21:56:45 +0800
committermfy43 <[email protected]>2016-05-05 21:56:45 +0800
commitc7175e92aaee71ec12a620df05e3b57de2cc96f4 (patch)
tree2f15f06765e2c3aad5cb3b76220114fc33aa0e7e
parent40da326da485cae4e0a72a96db1fb0a3c90757e4 (diff)
parent63d2755759495db0941e2944827c8c5936e39a8f (diff)
Merge branch 'master' into 'master'
fix param_repo:add bug See merge request !3
-rw-r--r--nerv/layer/affine.lua2
-rw-r--r--nerv/layer/lstm_gate.lua2
-rw-r--r--nerv/layer/projection.lua2
3 files changed, 3 insertions, 3 deletions
diff --git a/nerv/layer/affine.lua b/nerv/layer/affine.lua
index 3bf5a11..467eac9 100644
--- a/nerv/layer/affine.lua
+++ b/nerv/layer/affine.lua
@@ -172,7 +172,7 @@ end
function AffineLayer:get_params()
local pr = nerv.ParamRepo({self.ltp1, self.bp}, self.loc_type)
for i = 2, #self.dim_in do
- pr:add(self["ltp" .. i].id, self["ltp" .. i])
+ pr:add(self["ltp" .. i])
end
return pr
end
diff --git a/nerv/layer/lstm_gate.lua b/nerv/layer/lstm_gate.lua
index 99bf3ca..3bb3cb9 100644
--- a/nerv/layer/lstm_gate.lua
+++ b/nerv/layer/lstm_gate.lua
@@ -89,7 +89,7 @@ end
function LSTMGateLayer:get_params()
local pr = nerv.ParamRepo({self.bp}, self.loc_type)
for i = 1, #self.dim_in do
- pr:add(self["ltp" .. i].id, self["ltp" .. i])
+ pr:add(self["ltp" .. i])
end
return pr
end
diff --git a/nerv/layer/projection.lua b/nerv/layer/projection.lua
index d99401c..c0b5638 100644
--- a/nerv/layer/projection.lua
+++ b/nerv/layer/projection.lua
@@ -58,7 +58,7 @@ end
function ProjectionLayer:get_params()
local pr = nerv.ParamRepo({self.ltp1}, self.loc_type)
for i = 2, #self.dim_in do
- pr:add(self["ltp" .. i].id, self["ltp" .. i])
+ pr:add(self["ltp" .. i])
end
return pr
end