Open mdeora opened 7 years ago
Which version of tensorflow?
I was using tensorflow 0.9 to train the model.
I am on 1.0.1
Thanks it works now, but another error during predict
Traceback (most recent call last):
File "predict.py", line 73, in
https://github.com/jiegzhan/multi-class-text-classification-cnn-rnn/issues/2
Please look at the issue above.
Traceback (most recent call last): File "train.py", line 136, in
train_cnn()
File "train.py", line 59, in train_cnn
l2_reg_lambda=params['l2_reg_lambda'])
File "/webserver/github/multi-class-text-classification-cnn/text_cnn.py", line 49, in init
self.h_pool = tf.concat(3, pooled_outputs)
File "/usr/local/lib/python3.6/site-packages/tensorflow/python/ops/array_ops.py", line 1047, in concat
dtype=dtypes.int32).get_shape(
File "/usr/local/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 651, in convert_to_tensor
as_ref=False)
File "/usr/local/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 716, in internal_convert_to_tensor
ret = conversion_func(value, dtype=dtype, name=name, as_ref=as_ref)
File "/usr/local/lib/python3.6/site-packages/tensorflow/python/framework/constant_op.py", line 176, in _constant_tensor_conversion_function
return constant(v, dtype=dtype, name=name)
File "/usr/local/lib/python3.6/site-packages/tensorflow/python/framework/constant_op.py", line 165, in constant
tensor_util.make_tensor_proto(value, dtype=dtype, shape=shape, verify_shape=verify_shape))
File "/usr/local/lib/python3.6/site-packages/tensorflow/python/framework/tensor_util.py", line 367, in make_tensor_proto
_AssertCompatible(values, dtype)
File "/usr/local/lib/python3.6/site-packages/tensorflow/python/framework/tensor_util.py", line 302, in _AssertCompatible
(dtype.name, repr(mismatch), type(mismatch).name))
TypeError: Expected int32, got list containing Tensors of type '_Message' instead.