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
网友评论