This repository was archived by the owner on Jan 7, 2025. It is now read-only.
fix variable reuse probolem#1739
Open
zh794390558 wants to merge 1 commit intoNVIDIA:masterfrom
zh794390558:reuse
Open
fix variable reuse probolem#1739zh794390558 wants to merge 1 commit intoNVIDIA:masterfrom zh794390558:reuse
zh794390558 wants to merge 1 commit intoNVIDIA:masterfrom
zh794390558:reuse
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Traceback (most recent call last):
File "model/main.py", line 427, in
tf.app.run()
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/platform/app.py", line 48, in run
_sys.exit(main(_sys.argv[:1] + flags_passthrough))
File "model/main.py", line 233, in main
train_model.create_model(UserModel, stage_scope)
File "/gfs/atlas/zhanghui/postfilter-gan/model/base.py", line 163, in create_model
y=batch_y_split[dev_i])
File "/gfs/atlas/zhanghui/postfilter-gan/model/base.py", line 240, in add_tower
tower = obj_tower(x, y, input_shape, self.nclasses, is_training, is_inference)
File "", line 41, in init
File "", line 119, in postfilter_gan_init
File "", line 142, in build_model
File "", line 291, in generator
File "/gfs/atlas/zhanghui/postfilter-gan/model/ops.py", line 80, in conv2d
initializer=tf.truncated_normal_initializer(stddev=stddev))
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/variable_scope.py", line 1065, in get_variable
use_resource=use_resource, custom_getter=custom_getter)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/variable_scope.py", line 962, in get_variable
use_resource=use_resource, custom_getter=custom_getter)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/variable_scope.py", line 367, in get_variable
validate_shape=validate_shape, use_resource=use_resource)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/variable_scope.py", line 352, in _true_getter
use_resource=use_resource)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/variable_scope.py", line 664, in _get_single_variable
name, "".join(traceback.format_list(tb))))
ValueError: Variable generator/g_h0_conv/w already exists, disallowed. Did you mean to set reuse=True in VarScope? Originally defined at:
I have this problem in use this repo, may be this PR is the correct solution.