Hub: downloading universal sentence encoder pre-trained model

Created on 30 Jul 2018  路  4Comments  路  Source: tensorflow/hub

Hi,

I would like to try the Universal Sentence encoder pre-trained model for a text classification task with the following code, but it has hung for hours, and the network connection is fine.

module_url = "https://tfhub.dev/google/universal-sentence-encoder/2"
embed = hub.Module(module_url)

Any advice on how to access the pre-trained model?

Thx a lot.

Most helpful comment

That's weird. We've just added https://github.com/tensorflow/hub/blob/master/docs/common_issues.md with recurring network issues. Could you try what it says at the bottom and check whether your browser or wget or curl can download the module as a tarball from
https://tfhub.dev/google/universal-sentence-encoder/2?tf-hub-format=compressed
?

All 4 comments

I meet the same question, do you solve it yet?

That's weird. We've just added https://github.com/tensorflow/hub/blob/master/docs/common_issues.md with recurring network issues. Could you try what it says at the bottom and check whether your browser or wget or curl can download the module as a tarball from
https://tfhub.dev/google/universal-sentence-encoder/2?tf-hub-format=compressed
?

Attaching ?tf-hub-format=compressed to the URL solved the problem. Thanks for your help!

Hi,
Is there any pre-trained-model available for the lite version?

https://colab.research.google.com/github/tensorflow/hub/blob/master/examples/colab/semantic_similarity_with_tf_hub_universal_encoder_lite.ipynb#scrollTo=dMTa6V4a-cmf

It would be great if anyone can help me.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

codevjs picture codevjs  路  4Comments

basroelenga picture basroelenga  路  3Comments

truas picture truas  路  4Comments

bzburr picture bzburr  路  4Comments

dav-ell picture dav-ell  路  4Comments