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: object too deep for desired array #14

Closed
tonyatml opened this issue Sep 7, 2017 · 3 comments
Closed

ValueError: object too deep for desired array #14

tonyatml opened this issue Sep 7, 2017 · 3 comments

Comments

@tonyatml
Copy link

tonyatml commented Sep 7, 2017

Hi Buddy,

There is an error when I run your program via 'ipython notebook' with following tips

NFO:tensorflow:Restoring parameters from ./save

ValueError Traceback (most recent call last)
in ()
30
31 #pred_word = pick_word(probabilities[dyn_seq_length-1], int_to_vocab)
---> 32 pred_word = pick_word(probabilities[0], int_to_vocab)
33
34 gen_sentences.append(pred_word)

in pick_word(probabilities, int_to_vocab)
6 :return: String of the predicted word
7 """
----> 8 return np.random.choice(list(int_to_vocab.values()), 1, p=probabilities)[0]

mtrand.pyx in mtrand.RandomState.choice (numpy/random/mtrand/mtrand.c:17602)()

ValueError: object too deep for desired array

@zackthoutt
Copy link
Owner

Hmm, are you using version 1.0.0 of Tensorflow?

@tonyatml
Copy link
Author

tonyatml commented Sep 11, 2017

@zackthoutt ,I am using version 1.3.0 installed via 'pip install' with GPU supported. The python version is 2.7.12.

@zackthoutt
Copy link
Owner

See #15

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

2 participants