summaryrefslogtreecommitdiff
path: root/model/condlstm.py
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2017-01-17 21:58:13 +0100
committerAlex Auvolat <alex@adnab.me>2017-01-17 21:58:13 +0100
commit9eafa549291f707837940243b7302ce552eaaa20 (patch)
tree51823241f10d9b399ef139ab9ac090d3e3be4af3 /model/condlstm.py
parent2a4f89c41b82e7173d6fb4481af0dcd58c812c19 (diff)
downloadtext-rnn-9eafa549291f707837940243b7302ce552eaaa20.tar.gz
text-rnn-9eafa549291f707837940243b7302ce552eaaa20.zip
Change hierarchy.
Diffstat (limited to 'model/condlstm.py')
-rw-r--r--model/condlstm.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/model/condlstm.py b/model/condlstm.py
index 1d62b0a..26d9582 100644
--- a/model/condlstm.py
+++ b/model/condlstm.py
@@ -10,7 +10,7 @@ from blocks.roles import WEIGHT
from blocks.graph import ComputationGraph, apply_noise, apply_dropout
-class CondLSTM(LSTM):
+class RstLSTM(LSTM):
@recurrent(sequences=['inputs', 'run_mask', 'rst_in_mask', 'rst_out_mask'],
states=['states', 'cells'],
contexts=[], outputs=['states', 'cells', 'outputs'])
@@ -24,7 +24,6 @@ class CondLSTM(LSTM):
states, cells = self.apply(iterate=False,
inputs=inputs, states=states, cells=cells,
mask=run_mask)
-
outputs = states
if rst_out_mask:
@@ -69,7 +68,7 @@ class Model():
bricks.append(linear)
inter = linear.apply(recvalues[:, :, :indim])
- lstm = CondLSTM(dim=p['dim'], activation=config.activation_function,
+ lstm = RstLSTM(dim=p['dim'], activation=config.activation_function,
name="lstm_rec_%d"%i)
bricks.append(lstm)