is there a small neural network in tf.nn.embedding_lookup?? When I train some data, a value of the same index is changing. So is it trained also? while I'm training my model
I checked the official embedding_lookup code but I can not see any tf.Variables for train embedding parameter. But when I print all tf.Variables then I can found a Variable which is within embedding scope
Thank you.
Yes, the embedding is learned. You can look at the
tf.nn.embedding_lookupoperation as doing the following matrix multiplication more efficiently:The variable
W_emwill be trained in exactly the same way irrespective of whether you usey_em_1ory_em_2formulation;y_em_1is likely to be more efficient, though.