aboutsummaryrefslogtreecommitdiff
path: root/nerv/layer/lstm.lua
diff options
context:
space:
mode:
authorQi Liu <[email protected]>2016-05-09 17:57:30 +0800
committerQi Liu <[email protected]>2016-05-09 17:57:30 +0800
commit89a3fa93d571f446bcd1fa69ddd35257d975c239 (patch)
tree42d80fe75fe3af265bceca3c6593c027b0b87dcf /nerv/layer/lstm.lua
parentd88a57f4852c50a2678de950ee650ed9b6a895f0 (diff)
merge affine & lstm_gate & projection layer
Diffstat (limited to 'nerv/layer/lstm.lua')
-rw-r--r--nerv/layer/lstm.lua8
1 files changed, 3 insertions, 5 deletions
diff --git a/nerv/layer/lstm.lua b/nerv/layer/lstm.lua
index 3de3453..e568ee8 100644
--- a/nerv/layer/lstm.lua
+++ b/nerv/layer/lstm.lua
@@ -23,16 +23,14 @@ function LSTMLayer:__init(id, global_conf, layer_conf)
},
['nerv.AffineLayer'] = {
mainAffine = {dim_in = {din, dout}, dim_out = {dout}, pr = pr},
+ forgetGate = {dim_in = {din, dout, dout}, dim_out = {dout}, param_type = {'N', 'N', 'D'}, pr = pr, activation = nerv.SigmoidLayer},
+ inputGate = {dim_in = {din, dout, dout}, dim_out = {dout}, param_type = {'N', 'N', 'D'}, pr = pr, activation = nerv.SigmoidLayer},
+ outputGate = {dim_in = {din, dout, dout}, dim_out = {dout}, param_type = {'N', 'N', 'D'}, pr = pr, activation = nerv.SigmoidLayer},
},
['nerv.TanhLayer'] = {
mainTanh = {dim_in = {dout}, dim_out = {dout}},
outputTanh = {dim_in = {dout}, dim_out = {dout}},
},
- ['nerv.LSTMGateLayer'] = {
- forgetGate = {dim_in = {din, dout, dout}, dim_out = {dout}, param_type = {'N', 'N', 'D'}, pr = pr},
- inputGate = {dim_in = {din, dout, dout}, dim_out = {dout}, param_type = {'N', 'N', 'D'}, pr = pr},
- outputGate = {dim_in = {din, dout, dout}, dim_out = {dout}, param_type = {'N', 'N', 'D'}, pr = pr},
- },
['nerv.ElemMulLayer'] = {
inputGateMul = {dim_in = {dout, dout}, dim_out = {dout}},
forgetGateMul = {dim_in = {dout, dout}, dim_out = {dout}},