An Example for tf.nn.embedding_lookup

import tensorflow as tf;
import numpy as np;
 
c = np.random.random([10,1])
b = tf.nn.embedding_lookup(c, [1, 3, 1])
 
with tf.Session() as sess:
    sess.run(tf.initialize_all_variables())
    print sess.run(b)
    print c

The result is:

[[0.94480971]
 [0.90901431]
 [0.94480971]]
[[0.2706293 ]
 [0.94480971]
 [0.40118441]
 [0.90901431]
 [0.90482451]
 [0.75226252]
 [0.80218034]
 [0.84691245]
 [0.0257184 ]
 [0.01721495]]

,