Error on Scope Variable While Using Tensorflow Hub
TF Hub USE-3 Module doesn't work with Tensorflow Version 2.0.
Hence, if you change the version from 2.0 to 1.15, it works without any error.
Please find the working code mentioned below:
!pip install tensorflow==1.15
!pip install "tensorflow_hub>=0.6.0"
!pip3 install tensorflow_text==1.15
import tensorflow as tf
import tensorflow_hub as hub
import numpy as np
import tensorflow_text
module = hub.Module("https://tfhub.dev/google/universal-sentence-encoder-large/3")
Please find the Github Gist of Google Colab as well.