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

ValueError: setting an array element with a sequence. #22

Open
puneetvaza opened this issue Oct 13, 2017 · 4 comments
Open

ValueError: setting an array element with a sequence. #22

puneetvaza opened this issue Oct 13, 2017 · 4 comments

Comments

@puneetvaza
Copy link

fc7_tf, generated_words_tf = caption_generator.build_generator(maxlen=maxlen) in ipython_demo f
state = tf.zeros([1, self.lstm.state_size]) in model.py
i am using python 2.7 and tf 1.3.0
i am getting this error and how i can resolve it. and will be able to run the code properly .

@SilencerChen
Copy link

Have you solved it ?
I have the same problem and I don't know how to deal with it.
It would be so great if you can tell me what should I do.

@336655asd
Copy link

I have the question too.
I searched on the stackoverflow and know that there is something with the shape of tensor.
However ,when I change the 'self.lstm.state_size' to [256,256],another question happend.

@laiaaa0
Copy link

laiaaa0 commented Apr 7, 2018

Change the line
self.lstm = BasicLSTMCell(dim_hidden)
to
self.lstm = BasicLSTMCell(dim_hidden,state_is_tuple=False)

@Jason-xin
Copy link

state =self.lstm.zero_state(1, dtype=tf.float32)

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

5 participants