-
Notifications
You must be signed in to change notification settings - Fork 938
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
Saving & Loading the model #15
Comments
I have a same problem regarding Saving and loading this model. |
There's a lot of questions online about this, for example, the following link might help you, to sum up, you just need to save the TensorFlow graph to disks and reload it, and you can reload it in Python or here in C++ for example: https://stackoverflow.com/questions/35508866/tensorflow-different-ways-to-export-and-run-graph-in-c For now, I don't have the time to implement this. At least, let me give you a hint: you should give a name to the input placeholders and the variables you want to get. For example, in this code:
We'll need to the name the params if I'm not wrong:
Then in the sess.run, instead of referencing the variables, you reference a string formatted in a certain way which refers to the variable name. From what I recall, this string should be like "x:0" to replace the python tensor reference variable, such as like this in Python:
So once you load back the model you'll need to use the string as you don't have the named Python variable holding the placeholder anymore. Hope this helps. |
I have same problem. I saved ckpt and load ckpt to inference. but its result is very different [train->prediction]. i check test data and find what is problem. INPUT_SIGNAL_TYPES is python set data type. that is problem when you distinct train, test code. you change INPUT_SIGNAL_TYPES data type to ordered data type. I'm not familiar English, but I hope it helps. |
This issue will be fixed by PR #32. |
@guillaume-chevalier I tried this to run prediction on new sample X_val, its giving me error 'pred' not defined. I am running it like below: Error: pred not defined.. |
Got it working. |
How did you get it working ? Could you add the missing part(s) for re-constructing |
I have a same problem regarding re-constructing pred |
How you get it working? |
Do you have any examples of Saving the model and Loading it back up to run a prediction?
The text was updated successfully, but these errors were encountered: