carpedm20 / carpedm20/NTM-tensorflow

Error with TensorFlow 1.1.0

Open
#30 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
Jupyter Notebook
Stars
1k
Forks
212
PR merge metrics
No merged PRs in 30d

Description

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.
>>> import tensorflow as tf
>>> tf.__version__
'1.1.0'
>>>

++++++
I failed to resolve this issue, can you take a look and see what happened? Thanks.

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the README's copy task with Python 2.7.12 and TensorFlow 1.1.0. Inspect main.py around create_ntm and ntm.py around build_model line 169, following the variable-scope traceback. Done means the copy task completes without the reported RMSProp scope error.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, tensorflow
Domain
machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.