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

ValueError : Variable proj_w already exists, disallowed. did you mean to set reuse=true in VarScope? #2975

Closed
suraj-vantigodi opened this issue Jun 21, 2016 · 1 comment

Comments

@suraj-vantigodi
Copy link

GitHub issues are for bugs / installation problems / feature requests.
For general support from the community, see StackOverflow.
To make bugs and feature requests more easy to find and organize, we close issues that are deemed
out of scope for GitHub Issues and point people to StackOverflow.

For bugs or installation issues, please provide the following information.
The more information you provide, the more easily we will be able to offer
help and advice.

Environment info

Operating System:

Installed version of CUDA and cuDNN: 7.5
(please attach the output of ls -l /path/to/cuda/lib/libcud*):

  1. The output from python -c "import tensorflow; print(tensorflow.__version__)". 0.8

If installed from sources, provide the commit hash:

Steps to reproduce

I have created a REST webservice to execute machine translation with some modifications in translate.py. If I run decode function in translate.py alone, on multiple runs I get the right output. But when I try to run the decode function through the webservice that I have created, the first time, I get the translation result. But on the second iteration, I get an error mentioned in the title.

What have you tried?

  1. I tried to close the session at the end of decode function in translate.py.

Logs or other output that would be helpful

(If logs are large, please upload as attachment).
logs-1.txt

@mrry
Copy link
Contributor

mrry commented Jun 21, 2016

This sounds like more like a question for Stack Overflow than a bug in TensorFlow, and we'll need more details to answer definitively.

However, I suspect the problem is that you're rebuilding the graph in each request, and there is some collision between the shared variables. The best approach would be to create the graph once and reuse it for all requests. A quick workaround would be to wrap your call to demo1.demo(input) in a with tf.Graph().as_default(): block, to ensure that the model is recreated in an empty graph.

@mrry mrry closed this as completed Jun 21, 2016
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

No branches or pull requests

2 participants