From c6426e9970a44d282a4a5d2abb936d36c44de056 Mon Sep 17 00:00:00 2001 From: dsx4602 Date: Tue, 21 Nov 2017 21:55:39 +0800 Subject: [PATCH] Update cells.py In line #100 of cell.py, 'z1' should be instead of 'z0', otherwise f would equal to i, which contradicts with LSTM model. --- seq2seq/cells.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/seq2seq/cells.py b/seq2seq/cells.py index 1f89070..156a118 100644 --- a/seq2seq/cells.py +++ b/seq2seq/cells.py @@ -97,7 +97,7 @@ def build_model(self, input_shape): z0, z1, z2, z3 = get_slices(z, 4) i = Activation(self.recurrent_activation)(z0) - f = Activation(self.recurrent_activation)(z0) + f = Activation(self.recurrent_activation)(z1) c = add([multiply([f, c_tm1]), multiply([i, Activation(self.activation)(z2)])]) o = Activation(self.recurrent_activation)(z3)