farizrahman4u / seq2seq

Sequence to Sequence Learning with Keras
GNU General Public License v2.0
3.17k stars 845 forks source link

Possible bug in cell.py #225

Open macul99 opened 6 years ago

macul99 commented 6 years ago

I guess the line #100 of cell.py should be 'z1' instead of 'z0':

"f = Activation(self.recurrent_activation)(z0)"

rtygbwwwerr commented 6 years ago

I think so, the code probably is wrong: i = Activation(self.recurrent_activation)(z0) f = Activation(self.recurrent_activation)(z0)

    c = add([multiply([f, c_tm1]), multiply([i, Activation(self.activation)(z2)])])
    o = Activation(self.recurrent_activation)(z3)
    h = multiply([o, Activation(self.activation)(c)])
    y = Activation(self.activation)(W2(h))

Apparently, in this code, f would equal to i, which contradicts with LSTM model.

dsx4602 commented 6 years ago

I can't agree more. z1 should be instead of z0.