-
Notifications
You must be signed in to change notification settings - Fork 196
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
meta graph saving and loading similar to python #131
Comments
There is limited support for this already, one of the oldest tests actually uses it to load a really old python created graph def and use it for inference: https://github.com/tensorflow/haskell/blob/master/tensorflow-mnist/tests/ParseTest.hs#L141 The graphs are saved as protobufs, so you can use proto-lens to read it, call |
Is this pull request relevant? #104 |
Hello @fkm3, Suppose a graph saved with such function in Python:
Then you get your graph model:
(there are no checkpoints files any more in last version if I am correct -- everything is in variables/*) How to use it in an Haskell workflow please ? |
Hi. I haven't played with 1.3 yet or dug into the variable checkpoint format, so I'm not sure what the answer is. The current There is a "RestoreV2" op available that is probably required to load the new format: https://tensorflow.github.io/haskell/haddock/tensorflow-core-ops-0.1.0.0/TensorFlow-GenOps-Core.html#v:restoreV2 You could try adding a |
Thanks for you reply and pointer. Do you know if there an equivalent of mnist_client.py in Haskell ? |
I haven't used tensorflow serving before, but it looks like it simply exposes a GRPC serving, so I think you are right and that is probably an easier route if you just want to eval a model from haskell. It looks like there are some GRPC libraries, but I've never tried them: https://github.com/awakesecurity/gRPC-haskell and https://github.com/grpc/grpc-haskell |
*GRPC service |
Would love to be able to pull in modules from the TensorFlow Hub and use those for e.g. easy out-of-the-box embeddings. Looks like they're all stored in the newer format described by this issue. Has anyone looked into this more in the last year? Looking at the source for Happy to learn and try to build out a working connector to the TensorFlow Hub if folks can point me in the right direction! |
Has there been any update on support for loading tensorflow graphs from protobufs? What TF versions (if any) are currently supported? |
as-is we can save and load individual tensors
it would be quite good if we could also save/load the metagraph thing, as in python
this way, it would be very easy to train in python and run in haskell, without having to re-create the whole model in haskell (and likewise the other way)
The text was updated successfully, but these errors were encountered: