Skip to content

Seems like the tensorflow API changed? #14

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
mwufi opened this issue Oct 9, 2017 · 1 comment
Closed

Seems like the tensorflow API changed? #14

mwufi opened this issue Oct 9, 2017 · 1 comment

Comments

@mwufi
Copy link

mwufi commented Oct 9, 2017

When running this code under Tensorflow 1.0, I get

Traceback (most recent call last):
  File "single.py", line 99, in <module>
    l2_lambda=FLAGS.l2_lambda)
  File "/home/zen/uu/key-value-memory-networks/key_value_memory/memn2n_kv.py", line 124, in __init__
    initializer=tf.contrib.layers.xavier_initializer())])
  File "/home/zen/anaconda2/lib/python2.7/site-packages/tensorflow/python/ops/array_ops.py", line 1029, in concat
    dtype=dtypes.int32).get_shape(
  File "/home/zen/anaconda2/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 639, in convert_to_tensor
    as_ref=False)
  File "/home/zen/anaconda2/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 704, in internal_convert_to_tensor
    ret = conversion_func(value, dtype=dtype, name=name, as_ref=as_ref)
  File "/home/zen/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/zen/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/zen/anaconda2/lib/python2.7/site-packages/tensorflow/python/framework/tensor_util.py", line 370, in make_tensor_proto
    _AssertCompatible(values, dtype)
  File "/home/zen/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.

How do you suggest changing it?
This link is relevant: https://stackoverflow.com/questions/41813665/tensorflow-slim-typeerror-expected-int32-got-list-containing-tensors-of-type

@siyuanzhao
Copy link
Owner

The version of the Tensorflow under this code base is 0.9.
There is a pull request which updates the tensorflow to 1.3.
#11

You may get some idea about how to fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants