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

Fix for reuse that caused issues #8

Merged
merged 1 commit into from Jan 17, 2017

Conversation

kmyi
Copy link
Contributor

@kmyi kmyi commented Jan 17, 2017

reuse variable was being unused. This actually caused some issues when the program was run, causing tensorflow to crash.

Again, this fix may be incorrect. Please merge with caution.

Kwang

@carpedm20 carpedm20 closed this in 1ecb075 Jan 17, 2017
@kmyi
Copy link
Contributor Author

kmyi commented Jan 17, 2017

Even with 1ecb075 I still get the following error

ValueError: Variable discriminator/conv_1/weights does not exist, or was not created with tf.get_variable(). Did you mean to set reuse=None in VarScope?

Perhaps you should set reuse=False on the first one?

Kwang

@carpedm20 carpedm20 reopened this Jan 17, 2017
@carpedm20
Copy link
Owner

Are you using the most recent tf? I've never suffered from it even after I updated tf just before.

@kmyi
Copy link
Contributor Author

kmyi commented Jan 17, 2017

Are you using the most recent tf? I've never suffered from it even after I updated tf just before.

Yeap, pip installed tensorflow tensorflow-gpu

tf.__version__ tells me 0.12.1

@kmyi
Copy link
Contributor Author

kmyi commented Jan 17, 2017

ooooh... nightly is quite scary though...

What about this fix? Should be correct right? It seems it's just a matter of which get's initialized first...

@carpedm20
Copy link
Owner

carpedm20 commented Jan 17, 2017

Oh, now I see the problem.

self.D_y, self.D_y_logits = \
      self._build_discrim(self.normalized_y, name="D_y")

which doesn't use reuse=True should be on time. So it should be like:

  self.D_y, self.D_y_logits = \
      self._build_discrim(self.normalized_y, name="D_y")
  self.D_R_x, self.D_R_x_logits = \
      self._build_discrim(self.R_x, name="D_R_x", reuse=True)
  self.D_R_x_history, self.D_R_x_history_logits = \
      self._build_discrim(self.R_x_history,
                          name="D_R_x_history", reuse=True)

Give me a PR again with this. I don't know why it went down..

@kmyi
Copy link
Contributor Author

kmyi commented Jan 17, 2017

I squashed and change the PR :-) plz merge

@kmyi
Copy link
Contributor Author

kmyi commented Jan 17, 2017

Give me a PR again with this. I don't know why it went down..

Maybe emacs or vim magic?

@carpedm20 carpedm20 merged commit 18d1fed into carpedm20:master Jan 17, 2017
@carpedm20
Copy link
Owner

@kmyid Thanks again!

@kmyi kmyi deleted the fix-unused-reuse branch January 17, 2017 16:20
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

Successfully merging this pull request may close these issues.

None yet

2 participants