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

ValueError: The shape for towers/gpu_0/networks/Bi-RNN/layer_0/FW/while/Merge_3:0 is not an invariant for the loop. on babi_rnn #4

Open
SeekPoint opened this issue Sep 13, 2017 · 0 comments

Comments

@SeekPoint
Copy link

SeekPoint commented Sep 13, 2017

python3 -m babi_rnn.main --noload --task 3

.....

WARNING:tensorflow:tf.op_scope(values, name, default_name) is deprecated, use tf.name_scope(name, default_name, values)
WARNING:tensorflow:tf.op_scope(values, name, default_name) is deprecated, use tf.name_scope(name, default_name, values)
Traceback (most recent call last):
File "/usr/local/Cellar/python3/3.6.0_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "/usr/local/Cellar/python3/3.6.0_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/Users//qrn/babi_rnn/main.py", line 249, in
tf.app.run()
File "/Users//ve_tf0.11_py3/venv/lib/python3.6/site-packages/tensorflow/python/platform/app.py", line 30, in run
sys.exit(main(sys.argv[:1] + flags_passthrough))
File "/Users//qrn/babi_rnn/main.py", line 165, in main
summary = _main(config, num_trials)
File "/Users//qrn/babi_rnn/main.py", line 217, in _main
runner.initialize()
File "/Users//qrn/babi_rnn/base_model.py", line 71, in initialize
tower.initialize()
File "/Users//qrn/babi_rnn/model.py", line 165, in initialize
sequence_length=m_length, dtype='float', num_layers=L)
File "/Users//qrn/my/tensorflow/rnn.py", line 634, in dynamic_bidirectional_rnn
time_major=time_major, feed_prev_out=feed_prev_out, scope='FW')
File "/Users//qrn/my/tensorflow/rnn.py", line 488, in dynamic_rnn
swap_memory=swap_memory, sequence_length=sequence_length, feed_prev_out=feed_prev_out)
File "/Users/qrn/my/tensorflow/rnn.py", line 606, in _dynamic_rnn_loop
swap_memory=swap_memory)
File "/Users//ve_tf0.11_py3/venv/lib/python3.6/site-packages/tensorflow/python/ops/control_flow_ops.py", line 2518, in while_loop
result = context.BuildLoop(cond, body, loop_vars, shape_invariants)
File "/Users//ve_tf0.11_py3/venv/lib/python3.6/site-packages/tensorflow/python/ops/control_flow_ops.py", line 2356, in BuildLoop
pred, body, original_loop_vars, loop_vars, shape_invariants)
File "/Users//ve_tf0.11_py3/venv/lib/python3.6/site-packages/tensorflow/python/ops/control_flow_ops.py", line 2337, in _BuildLoop
_EnforceShapeInvariant(m_var, n_var)
File "/Users//ve_tf0.11_py3/venv/lib/python3.6/site-packages/tensorflow/python/ops/control_flow_ops.py", line 578, in _EnforceShapeInvariant
% (merge_var.name, m_shape, n_shape))
ValueError: The shape for towers/gpu_0/networks/Bi-RNN/layer_0/FW/while/Merge_3:0 is not an invariant for the loop. It enters the loop with shape (32, 91), but has shape (32, 122) after one iteration. Provide shape invariants using either the shape_invariants argument of tf.while_loop or set_shape() on the loop variables.
(venv) ali-186590cc37a5:qrn$

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