You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all thank you for all the effort put into this project!
I'm trying to get it to work. Currently under a Ubuntu 18.04 machine (Python 2.7.15 & Tensorflow 1.9)
However I am still struggling to get it to work. I am getting the following error message:
Traceback (most recent call last):
File "twitter-sentiment-cnn.py", line 195, in
h_pool = tf.concat(3, pooled_outputs)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/array_ops.py", line 1110, in concat
dtype=dtypes.int32).get_shape().assert_is_compatible_with(
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 1011, in convert_to_tensor
as_ref=False)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 1107, in internal_convert_to_tensor
ret = conversion_func(value, dtype=dtype, name=name, as_ref=as_ref)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/constant_op.py", line 217, in _constant_tensor_conversion_function
return constant(v, dtype=dtype, name=name)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/constant_op.py", line 196, in constant
value, dtype=dtype, shape=shape, verify_shape=verify_shape))
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/tensor_util.py", line 436, in make_tensor_proto
_AssertCompatible(values, dtype)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/tensor_util.py", line 347, in _AssertCompatible
(dtype.name, repr(mismatch), type(mismatch).name))
TypeError: Expected int32, got list containing Tensors of type '_Message' instead.
Thank you in advance!
The text was updated successfully, but these errors were encountered:
I'm sorry, but this code is so old that I don't even know which TensorFlow version is supposed to support.
If you're using Python 2.7, then there should be a TF version for which this code runs out of the box. It could go as far back as 1.4.
At this point, this repo has more of a historical/personal value than anything else :)
Thanks for your fast respone. (:
I've managed to run the script (after some more debugging). So it works.
The reason I wanted to give your script a try is that I am looking for a TF model that can analyze tweets. Therefore I am trying to save the model as a .pb file (using the SavedModel format). Then I can use it with TensorFlow Serving. However saving the model is still a bit tricky to do.
So I won't bother you with the details of that. I understand the meaning of this repo from your viewpoint :)
First of all thank you for all the effort put into this project!
I'm trying to get it to work. Currently under a Ubuntu 18.04 machine (Python 2.7.15 & Tensorflow 1.9)
However I am still struggling to get it to work. I am getting the following error message:
Traceback (most recent call last):
File "twitter-sentiment-cnn.py", line 195, in
h_pool = tf.concat(3, pooled_outputs)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/array_ops.py", line 1110, in concat
dtype=dtypes.int32).get_shape().assert_is_compatible_with(
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 1011, in convert_to_tensor
as_ref=False)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 1107, in internal_convert_to_tensor
ret = conversion_func(value, dtype=dtype, name=name, as_ref=as_ref)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/constant_op.py", line 217, in _constant_tensor_conversion_function
return constant(v, dtype=dtype, name=name)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/constant_op.py", line 196, in constant
value, dtype=dtype, shape=shape, verify_shape=verify_shape))
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/tensor_util.py", line 436, in make_tensor_proto
_AssertCompatible(values, dtype)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/tensor_util.py", line 347, in _AssertCompatible
(dtype.name, repr(mismatch), type(mismatch).name))
TypeError: Expected int32, got list containing Tensors of type '_Message' instead.
Thank you in advance!
The text was updated successfully, but these errors were encountered: