-
Notifications
You must be signed in to change notification settings - Fork 600
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
structures don't have the same sequence type #22
Comments
I had the same problem today, on MacOs 10.12.6 and Tensorflow 1.4.0. Will be interested if you find how to fix it! |
I had the same problem today, on ubuntu 16.04 and tensorflow 1.4.0 |
Encountering the same problem with Centos, kind of hoping for a solution. |
I had the same problem. I solved it by using these versions of tensorflow and sonnet. dm-sonnet requires tensorflow 1.5 , see -> https://github.com/deepmind/sonnet . pip uninstall tensorflow pip install tensorflow==1.5.0 I hope this helps, |
Would be helpful to check in a |
same problem here - even though I have tensorflow 1.7. Does it have to be version 1.5? Has anyone tried/figured out a way around this? Thanks. |
having the same problem even change to tf 1.5.0. Did anyone figure out any possible solutions to this problem yet? Thank you. |
It is because the input and output of the LSTMcell don't have the same type in tf.while_loop. The problem can be solved by a slight change in meta.py. line 368 line 377 Hope this help! |
@mily33 's method works with tf1.4.1 on Mac and Ubuntu. Thanks! |
had similar problems, @mily33 solved the issues. would it be possible to have a PR to fix this on the main repo? |
It works like a charm! Thanks @mily33 |
@mily33 Thanks a lot for solving the problem |
I ran python train.py --problem=mnist --save_path=./mnist.
And got the following error. I have no idea what is wrong with it, can anyboby help?
Traceback (most recent call last):
File "/Users/ylfzr/Documents/Projects/learning-to-learn-master/train.py", line 117, in
tf.app.run()
File "/Users/ylfzr/anaconda/lib/python2.7/site-packages/tensorflow/python/platform/app.py", line 48, in run
_sys.exit(main(_sys.argv[:1] + flags_passthrough))
File "/Users/ylfzr/Documents/Projects/learning-to-learn-master/train.py", line 70, in main
second_derivatives=FLAGS.second_derivatives)
File "/Users/ylfzr/Documents/Projects/learning-to-learn-master/meta.py", line 401, in meta_minimize
info = self.meta_loss(make_loss, len_unroll, **kwargs)
File "/Users/ylfzr/Documents/Projects/learning-to-learn-master/meta.py", line 360, in meta_loss
name="unroll")
File "/Users/ylfzr/anaconda/lib/python2.7/site-packages/tensorflow/python/ops/control_flow_ops.py", line 2775, in while_loop
result = context.BuildLoop(cond, body, loop_vars, shape_invariants)
File "/Users/ylfzr/anaconda/lib/python2.7/site-packages/tensorflow/python/ops/control_flow_ops.py", line 2604, in BuildLoop
pred, body, original_loop_vars, loop_vars, shape_invariants)
File "/Users/ylfzr/anaconda/lib/python2.7/site-packages/tensorflow/python/ops/control_flow_ops.py", line 2561, in _BuildLoop
nest.assert_same_structure(list(packed_vars_for_body), list(body_result))
File "/Users/ylfzr/anaconda/lib/python2.7/site-packages/tensorflow/python/util/nest.py", line 200, in assert_same_structure
_recursive_assert_same_structure(nest1, nest2, check_types)
File "/Users/ylfzr/anaconda/lib/python2.7/site-packages/tensorflow/python/util/nest.py", line 173, in _recursive_assert_same_structure
_recursive_assert_same_structure(n1, n2, check_types)
File "/Users/ylfzr/anaconda/lib/python2.7/site-packages/tensorflow/python/util/nest.py", line 173, in _recursive_assert_same_structure
_recursive_assert_same_structure(n1, n2, check_types)
File "/Users/ylfzr/anaconda/lib/python2.7/site-packages/tensorflow/python/util/nest.py", line 173, in _recursive_assert_same_structure
_recursive_assert_same_structure(n1, n2, check_types)
File "/Users/ylfzr/anaconda/lib/python2.7/site-packages/tensorflow/python/util/nest.py", line 173, in _recursive_assert_same_structure
_recursive_assert_same_structure(n1, n2, check_types)
File "/Users/ylfzr/anaconda/lib/python2.7/site-packages/tensorflow/python/util/nest.py", line 159, in _recursive_assert_same_structure
% (type_nest1, type_nest2))
TypeError: The two structures don't have the same sequence type. First structure has type <type 'tuple'>, while second structure has type <class 'sonnet.python.modules.gated_rnn.LSTMState'>.
Macos 10.12.6
tensorflow version used: 1.3.0
The text was updated successfully, but these errors were encountered: