Я использую следующий код для доступа к вложениям с помощью TF Hub Universal Sentence encoder.
import tensorflow as tf
import tensorflow_hub as hub
model = hub.load("https://tfhub.dev/google/universal-sentence-encoder/4")
def embed(input):
return model(input)
messages = ["There is no hard limit on how long the paragraph is. Roughly, the longer the more 'diluted' the embedding will be."]
message_embeddings = embed(messages)
Как я могу получить доступ к фактическим векторам сейчас?