Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upWhere should I get the detailed information of the embeddings of the USE model #344
Comments
|
I misunderstood the model and wrote wrong information on the description. To clarify differences, I checked the graph visualizations of USE models ( https://tfhub.dev/google/universal-sentence-encoder-large/3The model https://tfhub.dev/google/universal-sentence-encoder/2The model Though I now almost understand the models, it's difficult to trace the detailed computation in the graphs (e.g., what is the concrete expression of Can we access to TensorFlow codes that define the models in order to understand the models in detail? |
|
The code that defines the models is not available. Only the modules in tensorflow hub. "https://tfhub.dev/google/universal-sentence-encoder/2" first takes "https://tfhub.dev/google/universal-sentence-encoder-large/3" has a transformer encoder and it uses the average pooling over all token embeddings at the last transformer layer as the output embedding. |

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.



Hi.
I wanna understand the embeddings of the USE model in detail; where should I get the info?
For example, ELMo's embeddings are described on https://tfhub.dev/google/elmo/2.
But, in the case of USE, there is only a description
the output is a 512 dimensional vectoron https://tfhub.dev/google/universal-sentence-encoder/2.From where is the output coming?
I could find the output is corresponding to a tensor
<tf.Tensor 'module_apply_default/Encoder_en/hidden_layers/l2_normalize:0' shape=(?, 512) dtype=float32>of the model, but it's not easy to identify what value is exactly computed.I read the paper of USE, so I can guess the output is like
Σ_w Embed(w) / √sentence length. But I'm not sure which layer is used as the embeddings, the last layer of the Transformer Encoder? the first embedding lookup layer? or else?Thanks.