svsgoogle
svsgoogle
Hi Anil, You can use a local model by providing the name of a local directory. Please see https://github.com/tensorflow/hub/blob/master/tensorflow_hub/resolver.py#L543 The SavedModel produced by retrain.py cannot be used as a module....
For the record: the two lines mentioned in the previous comment that should be replaced are: init = tf.global_variables_initializer() sess.run(init)
Embedding a sentence is quite fast, but creating the graph is rather slow. You can try: ``` with tf.Graph().as_default(): embed = hub.Module("https://tfhub.dev/google/universal-sentence-encoder/1") sentence = "I am a sentence for which...
(In case you didn't get notified about the edit to my previous comment) Embedding a sentence is quite fast, but creating the graph is rather slow. You can try: ```...
That's right - embed(messages) will build a part of the TensorFlow graph. Graph building can be slow but graph execution is typically fast. To embed many sentences, you can either...
How long it takes to build the graph depends mostly on the complexity of the encoder's graph and not really that much on your sentence (unless you have truly gigantic...
Yes, the results of embedding lookup for each word is combined back into a single vector output for the sequence (phrase, sentence, etc.). You can pass individual words to the...
The issue seems to be that the module is cached in a directory that is not accessible to all the machines that initialize variables. Can you try to specify a...
It should be :)
The division happens in the lines with "tf.image.convert_image_dtype(...)".