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

TypeError: List of Tensors when single Tensor expected #2

Open
lmolhw5252 opened this issue Jan 4, 2018 · 0 comments
Open

TypeError: List of Tensors when single Tensor expected #2

lmolhw5252 opened this issue Jan 4, 2018 · 0 comments

Comments

@lmolhw5252
Copy link

Traceback (most recent call last):
File "/home/user/PycharmProjects/MDLSTM-master/main.py", line 90, in
run(1)
File "/home/user/PycharmProjects/MDLSTM-master/main.py", line 53, in run
rnn_out, _ = multi_dimensional_rnn_while_loop(rnn_size=hidden_size, input_data=x, context_wind_shape=[1, 1])
File "/home/user/PycharmProjects/MDLSTM-master/md_lstm.py", line 193, in multi_dimensional_rnn_while_loop
parallel_iterations=1)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/control_flow_ops.py", line 2816, in while_loop
result = loop_context.BuildLoop(cond, body, loop_vars, shape_invariants)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/control_flow_ops.py", line 2640, in BuildLoop
pred, body, original_loop_vars, loop_vars, shape_invariants)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/control_flow_ops.py", line 2576, in BuildLoop
c = ops.convert_to_tensor(pred(*packed_vars))
File "/home/user/PycharmProjects/MDLSTM-master/md_lstm.py", line 190, in condition
return tf.less(time
, tf.constant(h_red * w_red))
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 300, in _AssertCompatible
raise TypeError("List of Tensors when single Tensor expected")
TypeError: List of Tensors when single Tensor expected

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

1 participant