What does tf.nn.embedding_lookup function do?
问题 tf.nn.embedding_lookup(params, ids, partition_strategy='mod', name=None) I cannot understand the duty of this function. Is it like a lookup table? Which means to return the parameters corresponding to each id (in ids)? For instance, in the skip-gram model if we use tf.nn.embedding_lookup(embeddings, train_inputs) , then for each train_input it finds the correspond embedding? 回答1: embedding_lookup function retrieves rows of the params tensor. The behavior is similar to using indexing with