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

Load trained models #186

Open
fernandoblalves opened this issue Jul 13, 2020 · 2 comments
Open

Load trained models #186

fernandoblalves opened this issue Jul 13, 2020 · 2 comments

Comments

@fernandoblalves
Copy link

Is it possible to load in to tensorflow_scala models generated in python "main" tensorflow? I can't find anywhere who to do it.

Thanks

@samikrc
Copy link

samikrc commented Jul 13, 2020

Ah .. was just thinking about posting on this exact same thing :-)

Would like to load a locally saved tf_hub model, e.g., USE (https://tfhub.dev/google/universal-sentence-encoder/4). Searched for quite some time in the api, but couldn't find anything. Is this possible?

Something to the effect of:

>>> model = tf.saved_model.load(r"/path/to/use_4")

@samikrc
Copy link

samikrc commented Jul 15, 2020

It seems like the saved_model class and related utilities are available only in python and java. May be this is written as an utility in those languages. I couldn't find a reference to this in C++ API. Considering that this library is a wrapper on C++, it is somewhat unlikely to have this functionality. It is probably still possible to write such an utility in this library as well, maintaining the same general classnames etc.

Here are 2 implementations in Scala and Java through the Java library:

Waiting for @eaplatanios to respond if possible.

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