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: Expected int32, got list containing Tensors of type '_Message' instead #7

Open
lexior68 opened this issue May 8, 2017 · 1 comment

Comments

@lexior68
Copy link

lexior68 commented May 8, 2017

Hi, I am newbie
i'd tried your code, but I got "TypeError: Expected int32, got list containing Tensors of type '_Message' instead" error message. How to solve it?
Thanks

@gustavomr
Copy link
Contributor

gustavomr commented May 25, 2017

This is because TF changed your API due to version 1.x. You need to change:

self.h_pool = tf.concat(3, pooled_outputs)

self.h_pool = tf.concat(pooled_outputs, 3) # flip params

losses = tf.nn.softmax_cross_entropy_with_logits(self.scores, self.input_y)

losses = tf.nn.softmax_cross_entropy_with_logits(labels = self.input_y, logits = self.scores) # only named arguments accepted

I tested with TF 1.1 and worked! I'll try to make a pull request to it.

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