jiegzhan/multi-class-text-classification-cnn

TypeError: Expected int32, got list containing Tensors of type '_Message' instead

lexior68 opened this issue · 1 comments

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

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.