Skip to content
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

TensorFlow版本是多少呢? #5

Open
yick2232 opened this issue Oct 10, 2017 · 4 comments
Open

TensorFlow版本是多少呢? #5

yick2232 opened this issue Oct 10, 2017 · 4 comments

Comments

@yick2232
Copy link

运行出错,应该是版本问题,不知道您用的是哪个版本?

@yick2232
Copy link
Author

OK 我试出来了 v0.12

@GreenGitHuber
Copy link

Traceback (most recent call last):
File "train.py", line 260, in
main()
File "train.py", line 137, in main
l2_reg_lambda=FLAGS.l2_reg_lambda)
File "/Users/jiangqy/小论文/PairCNN-Ranking/Ranking.py", line 75, in init
self.h_pool_left = tf.reshape(tf.concat(3, pooled_outputs_left), [-1, num_filters_total], name='h_pool_left')
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/tensorflow/python/ops/array_ops.py", line 1061, in concat
dtype=dtypes.int32).get_shape(
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/tensorflow/python/framework/ops.py", line 611, in convert_to_tensor
as_ref=False)
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/tensorflow/python/framework/ops.py", line 676, in internal_convert_to_tensor
ret = conversion_func(value, dtype=dtype, name=name, as_ref=as_ref)
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/tensorflow/python/framework/constant_op.py", line 121, in _constant_tensor_conversion_function
return constant(v, dtype=dtype, name=name)
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/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 "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/tensorflow/python/framework/tensor_util.py", line 376, in make_tensor_proto
_AssertCompatible(values, dtype)
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/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.
(ENV3.5) Jqy-WorkSpace:PairCNN-Ranking jiangqy$ python3 -c 'import tensorflow as tf; print(tf.version)'
1.3.0
请问,这也是因为tensorflow版本问题吗

@yick2232
Copy link
Author

yick2232 commented Dec 2, 2017

最好用python2.7+tensorflow0.12吧 我是在这样的环境下才运行成功的

@SeekPoint
Copy link

yes,py2+tf0.12

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

3 participants