mem_absa icon indicating copy to clipboard operation
mem_absa copied to clipboard

TypeError: Expected int32, got list containing Tensors of type '_Message' instead. on tf1.4

Open SeekPoint opened this issue 6 years ago • 0 comments

mldl@ub1604:~/ub16_prj/mem_absa$ python2 main.py --show True /usr/local/lib/python2.7/dist-packages/h5py/init.py:36: FutureWarning: Conversion of the second argument of issubdtype from float to np.floating is deprecated. In future, it will be treated as np.float64 == np.dtype(float).type. from ._conv import register_converters as _register_converters Read 2358 aspects from data/Laptop_Train_v2.xml Read 654 aspects from data/Laptops_Test_Gold.xml {'batch_size': 128, 'edim': 300, 'init_hid': 0.1, 'init_lr': 0.01, 'init_std': 0.05, 'lindim': 75, 'max_grad_norm': 50, 'mem_size': 78, 'nepoch': 100, 'nhop': 7, 'nwords': 7144, 'pad_idx': 0, 'pretrain_file': 'data/glove.6B.300d.txt', 'show': True, 'test_data': 'data/Laptops_Test_Gold.xml', 'train_data': 'data/Laptop_Train_v2.xml'} loading pre-trained word vectors... 2018-09-25 12:09:09.418188: I tensorflow/core/platform/cpu_feature_guard.cc:137] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.1 SSE4.2 AVX AVX2 FMA 2018-09-25 12:09:09.475310: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:892] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero 2018-09-25 12:09:09.475614: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1030] Found device 0 with properties: name: GeForce GTX 950M major: 5 minor: 0 memoryClockRate(GHz): 1.124 pciBusID: 0000:01:00.0 totalMemory: 3.95GiB freeMemory: 3.67GiB 2018-09-25 12:09:09.475635: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1120] Creating TensorFlow device (/device:GPU:0) -> (device: 0, name: GeForce GTX 950M, pci bus id: 0000:01:00.0, compute capability: 5.0) Traceback (most recent call last): File "main.py", line 61, in tf.app.run() File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/platform/app.py", line 48, in run _sys.exit(main(_sys.argv[:1] + flags_passthrough)) File "main.py", line 57, in main model.build_model() File "/home/mldl/ub16_prj/mem_absa/model.py", line 107, in build_model self.build_memory() File "/home/mldl/ub16_prj/mem_absa/model.py", line 79, in build_memory a_til_concat = tf.concat(2, [til_hid3dim, Ain]) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/array_ops.py", line 1096, 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 836, in convert_to_tensor as_ref=False) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 926, 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 229, 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 208, 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 383, in make_tensor_proto _AssertCompatible(values, dtype) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/tensor_util.py", line 303, in _AssertCompatible (dtype.name, repr(mismatch), type(mismatch).name)) TypeError: Expected int32, got list containing Tensors of type '_Message' instead. mldl@ub1604:~/ub16_prj/mem_absa$

SeekPoint avatar Sep 25 '18 04:09 SeekPoint