Hi all, I have an issue when run train.py:
TensorFlow binary was not compiled to use: AVX2 FMA
Traceback (most recent call last):
File "train.py", line 90, in
l2_reg_lambda=FLAGS.l2_reg_lambda)
File "/home/anhduc/environments/my_env/cnn_text_classification/text_cnn.py", line 57, in init
self.h_pool = tf.concat(3, pooled_outputs)
File "/home/anhduc/environments/my_env/lib/python3.6/site-packages/tensorflow/python/ops/array_ops.py", line 1122, in concat
tensor_shape.scalar())
File "/home/anhduc/environments/my_env/lib/python3.6/site-packages/tensorflow/python/framework/tensor_shape.py", line 848, in assert_is_compatible_with
raise ValueError("Shapes %s and %s are incompatible" % (self, other))
ValueError: Shapes (3, ?, 1, 1, 128) and () are incompatible
Hi @anhduc2203 this API are pretty old. I would try with newer tensorflow API. Hope it helps
I have the same problem, can you help me solve it?
File "C:/Users/LeeHyungGeol/PycharmProjects/cnn-text-classification-tf/train.py", line 72, in
l2_reg_lambda=FLAGS.l2_reg_lambda)
File "C:\Users\LeeHyungGeol\PycharmProjects\cnn-text-classification-tf\text_cnn.py", line 57, in init
self.h_pool = tf.concat(3, pooled_outputs)
File "C:\Users\LeeHyungGeol\Anaconda3\lib\site-packages\tensorflow\python\util\dispatch.py", line 180, in wrapper
return target(*args, **kwargs)
File "C:\Users\LeeHyungGeol\Anaconda3\lib\site-packages\tensorflow\python\ops\array_ops.py", line 1254, in concat
tensor_shape.scalar())
File "C:\Users\LeeHyungGeol\Anaconda3\lib\site-packages\tensorflow\python\framework\tensor_shape.py", line 1023, in assert_is_compatible_with
raise ValueError("Shapes %s and %s are incompatible" % (self, other))
ValueError: Shapes (3, ?, 1, 1, 128) and () are incompatible
Hey this code is quite outdated now.