美文网首页
TensorFlow1.0 - C2 Guide - 5 Emb

TensorFlow1.0 - C2 Guide - 5 Emb

作者: 左心Chris | 来源:发表于2019-08-14 16:12 被阅读0次

1 Embeddings

https://www.tensorflow.org/guide/embedding
Google crash course about embedding
https://developers.google.com/machine-learning/crash-course/embeddings/video-lecture

1.0 Intro

Embeddings are important for input: we can train on dense vectors.
Embeddings are also valuable as outputs of machine learning: 可以通过向量比较相似度

1.1 Embeddings in TensorFlow

https://stackoverflow.com/questions/34870614/what-does-tf-nn-embedding-lookup-function-do 看Asher Stern的作答
word_embeddings是table
word_ids是index

word_embeddings = tf.get_variable(“word_embeddings”,
    [vocabulary_size, embedding_size])
embedded_word_ids = tf.nn.embedding_lookup(word_embeddings, word_ids)

可以用各种网络类型训练embedding,详见https://www.tensorflow.org/tutorials/representation/word2vec

1.2 Visualizing Embeddings

Embedding Projector has 3 panels: data panel, projections, inspector

Projections
Exploration
Metadata

相关文章

网友评论

      本文标题:TensorFlow1.0 - C2 Guide - 5 Emb

      本文链接:https://www.haomeiwen.com/subject/mwtbjctx.html