-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Serving Hub Module with Django #54
Comments
Hi Marco, you could try something like this: First initialize the graph.
Then initialize the session.
I don't know what Django allows but these would be persisted across requests. For inference you can just then call
|
Worked, thank you. |
I am very new to Tensorflow, I am trying to use text module.
Getting this error:
What am I doing wrong? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm trying to deploy a application using Django + Text Module.
I have a view with the logic using the module, but I need to keep the module on memory, to avoid the time the module need to load in every request.
When I try to re-use my session I receive:
File "/home/venv/local/lib/python2.7/site-packages/tensorflow_hub/module.py", line 191, in call
"Module must be applied in the graph it was instantiated for.")
RuntimeError: Module must be applied in the graph it was instantiated for.
Any way to solve this problem?
The text was updated successfully, but these errors were encountered: