Open w5688414 opened 5 years ago
I also encountered the same problem, how to solve?
This issue is still open today, even with a fresh environnement. Does anyone knows how to solve this ?
Got it guys, keras also have layers called GRUCell and LSTMCell, and the line "from keras.layers import *" overwrites the one imported from recurrentshop.
You should consider swapping both "from keras.layers import " and "from recurrentshop import ".
Issue Closed.
errors occur when I use the example code: `from recurrentshop import from keras.layers import from keras.models import Model
input = Input((5,)) state1_tm1 = Input((10,)) state2_tm1 = Input((10,)) state3_tm1 = Input((10,))
lstm_output, state1_t, state2_t = LSTMCell(10)([input, state1_tm1, state2_tm1]) gru_output, state3_t = GRUCell(10)([input, state3_tm1])
output = add([lstm_output, gru_output]) output = Activation('tanh')(output)
rnn = RecurrentModel(input=input, initial_states=[state1_tm1, state2_tm1, state3_tm1], output=output, final_states=[state1_t, state2_t, state3_t])` does anyone can help me? my keras version is 2.2,ubuntu 16.04,python3