tensorflow / hub

A library for transfer learning by reusing parts of TensorFlow models.
https://tensorflow.org/hub
Apache License 2.0
3.49k stars 1.67k forks source link

USE MultiLingual Large 2 unable to load in Google Colab #418

Closed vprelovac closed 5 years ago

vprelovac commented 5 years ago

https://tfhub.dev/google/universal-sentence-encoder-multilingual-large/2

is not possible to use in Google Colab due to tf-sentencepiece incompability.

Tried with TF 1.14.0 and TF 2.0.0.

Please provide an example how to use this model in Colab.

arnoegw commented 5 years ago

Hi @vprelovac, thanks for your message. Please see the excellent summary by @brenting in issue https://github.com/tensorflow/hub/issues/404#issuecomment-553983816

I suppose that will resolve your problem. If not, please reopen.

vprelovac commented 5 years ago

@arnoegw It would be wonderful if USEML documentation would be updated to reflect that fact as I lost an entire morning on this

arnoegw commented 5 years ago

https://tfhub.dev/google/universal-sentence-encoder-multilingual-large/2 says

Prerequisites

This module relies on the Tensorflow Text for input preprocessing. On Google Colaboratory, the Tensorflow Text library is available by:

!pip3 install tensorflow_text>=2.0.0rc0

@brenting concurs in https://github.com/tensorflow/hub/issues/404#issuecomment-553983816

What exactly would you like to have changed?