geek-ai/irgan

version of the tensorflow

Closed this issue · 1 comments

Thanks for sharing the code.
I wonder which version of tensorflow dis you use.
I have tensorflow-gpu (1.2.0), and running the baseline.py get the follow error,

load embeddings
Traceback (most recent call last):
  File "/home/hongzhi/wp/irgan/Question-Answer/baseline.py", line 229, in <module>
    main()
  File "/home/hongzhi/wp/irgan/Question-Answer/baseline.py", line 195, in main
    loss="pair")
  File "/home/hongzhi/wp/irgan/Question-Answer/Discriminator.py", line 15, in __init__
    learning_rate=learning_rate, embeddings=embeddings, loss=loss, trainable=trainable)
  File "/home/hongzhi/wp/irgan/Question-Answer/QACNN.py", line 70, in __init__
    q = self.getRepresentation(self.input_x_1)
  File "/home/hongzhi/wp/irgan/Question-Answer/QACNN.py", line 101, in getRepresentation
    pooled_reshape = tf.reshape(tf.concat(3, output), [-1, self.num_filters_total])
  File "/home/hongzhi/anaconda2/lib/python2.7/site-packages/tensorflow/python/ops/array_ops.py", line 1043, in concat
    dtype=dtypes.int32).get_shape(
  File "/home/hongzhi/anaconda2/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 676, in convert_to_tensor
    as_ref=False)
  File "/home/hongzhi/anaconda2/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 741, in internal_convert_to_tensor
    ret = conversion_func(value, dtype=dtype, name=name, as_ref=as_ref)
  File "/home/hongzhi/anaconda2/lib/python2.7/site-packages/tensorflow/python/framework/constant_op.py", line 113, in _constant_tensor_conversion_function
    return constant(v, dtype=dtype, name=name)
  File "/home/hongzhi/anaconda2/lib/python2.7/site-packages/tensorflow/python/framework/constant_op.py", line 102, in constant
    tensor_util.make_tensor_proto(value, dtype=dtype, shape=shape, verify_shape=verify_shape))
  File "/home/hongzhi/anaconda2/lib/python2.7/site-packages/tensorflow/python/framework/tensor_util.py", line 374, in make_tensor_proto
    _AssertCompatible(values, dtype)
  File "/home/hongzhi/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.

luzai commented

ref to closed issue 1
pls use tf.concat(axis=3, values=output), tf.multiply and tf.subtract