-
Notifications
You must be signed in to change notification settings - Fork 214
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
Error with TensorFlow 1.1.0 #30
Comments
pay attention to the 'reuse' in ntm.py |
Thank you @louiekang . I did notice that those lines might be the source of problem. But I do not know how to fix it. Can you please take a look and see what modifications are needed? |
@boyangumn, @louiekang is there a solution? Setting reuse to None does not help here. |
You may change the reuse to tf.AUTO_REUSE, but after the NotFoundError: Key NTM-copy/NTM-copy/controller/forget_gate_0/Bias/RMSProp not found in checkpoint |
very good, change the reuse to tf.AUTO_REUSE work for me. |
Hi, when I was running the copy task with the command you provided in the README, I got some variable scope related error. My environment is:
++++
Python: 2.7.12
TensorFlow: 1.1.0
++++
The error message is :
++++
[] Building a NTM model
Percent: [####################] 100.00% Finished.
[] Building a loss model for seq_length 1
Traceback (most recent call last):
File "main.py", line 72, in
tf.app.run()
File "/net/mlfs01/export/users/byang/env-tensorflow/local/lib/python2.7/site-packages/tensorflow/python/platform/app.py", line 48, in run
_sys.exit(main(_sys.argv[:1] + flags_passthrough))
File "main.py", line 54, in main
cell, ntm = create_ntm(FLAGS, sess)
File "main.py", line 39, in create_ntm
test_max_length=config.test_max_length, scope=scope, **ntm_args)
File "/net/mlfs01/export/users/byang/working/NTM-tensorflow/ntm.py", line 83, in init
self.build_model(forward_only)
File "/net/mlfs01/export/users/byang/working/NTM-tensorflow/ntm.py", line 169, in build_model
global_step=self.global_step)
File "/net/mlfs01/export/users/byang/env-tensorflow/local/lib/python2.7/site-packages/tensorflow/python/training/optimizer.py", line 446, in apply_gradients
self._create_slots([_get_variable_for(v) for v in var_list])
File "/net/mlfs01/export/users/byang/env-tensorflow/local/lib/python2.7/site-packages/tensorflow/python/training/rmsprop.py", line 99, in _create_slots
self._get_or_make_slot(v, val_rms, "rms", self._name)
File "/net/mlfs01/export/users/byang/env-tensorflow/local/lib/python2.7/site-packages/tensorflow/python/training/optimizer.py", line 727, in _get_or_make_slot
named_slots[_var_key(var)] = slot_creator.create_slot(var, val, op_name)
File "/net/mlfs01/export/users/byang/env-tensorflow/local/lib/python2.7/site-packages/tensorflow/python/training/slot_creator.py", line 113, in create_slot
return _create_slot_var(primary, val, "", validate_shape, None, None)
File "/net/mlfs01/export/users/byang/env-tensorflow/local/lib/python2.7/site-packages/tensorflow/python/training/slot_creator.py", line 66, in _create_slot_var
validate_shape=validate_shape)
File "/net/mlfs01/export/users/byang/env-tensorflow/local/lib/python2.7/site-packages/tensorflow/python/ops/variable_scope.py", line 1049, in get_variable
use_resource=use_resource, custom_getter=custom_getter)
File "/net/mlfs01/export/users/byang/env-tensorflow/local/lib/python2.7/site-packages/tensorflow/python/ops/variable_scope.py", line 948, in get_variable
use_resource=use_resource, custom_getter=custom_getter)
File "/net/mlfs01/export/users/byang/env-tensorflow/local/lib/python2.7/site-packages/tensorflow/python/ops/variable_scope.py", line 356, in get_variable
validate_shape=validate_shape, use_resource=use_resource)
File "/net/mlfs01/export/users/byang/env-tensorflow/local/lib/python2.7/site-packages/tensorflow/python/ops/variable_scope.py", line 341, in _true_getter
use_resource=use_resource)
File "/net/mlfs01/export/users/byang/env-tensorflow/local/lib/python2.7/site-packages/tensorflow/python/ops/variable_scope.py", line 671, in _get_single_variable
"VarScope?" % name)
ValueError: Variable NTM-copy/NTM-copy_1/init_cell/Variable/RMSProp/ does not exist, or was not created with tf.get_variable(). Did you mean to set reuse=None in VarScope?
(env-tensorflow) byang@snake10:/net/mlfs01/export/users/byang/working/NTM-tensorflow$ python
Python 2.7.12 (default, Nov 19 2016, 06:48:10)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
++++++
I failed to resolve this issue, can you take a look and see what happened? Thanks.
The text was updated successfully, but these errors were encountered: