Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: can only concatenate tuple (not "int") to tuple #110

Open
w5688414 opened this issue Dec 11, 2018 · 3 comments
Open

TypeError: can only concatenate tuple (not "int") to tuple #110

w5688414 opened this issue Dec 11, 2018 · 3 comments

Comments

@w5688414
Copy link

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

@anny0316
Copy link

anny0316 commented May 3, 2020

I also encountered the same problem, how to solve?

@RSLLES
Copy link

RSLLES commented Jan 4, 2021

This issue is still open today, even with a fresh environnement.
Does anyone knows how to solve this ?

@RSLLES
Copy link

RSLLES commented Jan 4, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants