multi-class-text-classification-cnn-rnn icon indicating copy to clipboard operation
multi-class-text-classification-cnn-rnn copied to clipboard

issue regarding training file please help

Open akshataph opened this issue 8 years ago • 2 comments

W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE3 instructions, but these are available on your machine and could speed up CPU computations. W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.1 instructions, but these are available on your machine and could speed up CPU computations. W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations. Traceback (most recent call last): File "train.py", line 161, in train_cnn_rnn() File "train.py", line 60, in train_cnn_rnn l2_reg_lambda = params['l2_reg_lambda']) File "/home/akshata/keras_NN/multi-class-text-classification-cnn-rnn-master/text_cnn_rnn.py", line 34, in init pad_prio = tf.concat(1, [self.pad] * num_prio) File "/root/anaconda2/lib/python2.7/site-packages/tensorflow/python/ops/array_ops.py", line 1047, in concat dtype=dtypes.int32).get_shape( File "/root/anaconda2/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 651, in convert_to_tensor as_ref=False) File "/root/anaconda2/lib/python2.7/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 "/root/anaconda2/lib/python2.7/site-packages/tensorflow/python/framework/constant_op.py", line 176, in _constant_tensor_conversion_function return constant(v, dtype=dtype, name=name) File "/root/anaconda2/lib/python2.7/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 "/root/anaconda2/lib/python2.7/site-packages/tensorflow/python/framework/tensor_util.py", line 367, in make_tensor_proto _AssertCompatible(values, dtype) File "/root/anaconda2/lib/python2.7/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.

akshataph avatar Feb 21 '17 09:02 akshataph

Are you able to solve this error? Please let me know

ushagayatri avatar Apr 12 '17 15:04 ushagayatri

I met this error using tf 1.0. After some googling, I found that the args of tf.concat() function were changed in tf 1.0. This project was built using tf 0.9, where args of tf.concat() func were tf.concat(int32, tensor), the args were changed to tf.concat(tensor, int32) in tf 1.0.

Jason2031 avatar Apr 22 '17 00:04 Jason2031