title: tf.nn.embedding_lookup - row or column?
body: <p>This is a very simple question. I'm learning tensorflow and converting my numpy-written code using Tensorflow.</p>
  
  <p>I have word embedding matrix defined  <code>U = [embedding_size, vocab_size]</code> therefore each column is the embedding vector of each word.</p>
  
  <p>I converted <code>U</code> into TF like below:</p>
  
  <pre><code>U = tf.Variable(tf.truncated_normal([embedding_size, vocab_size], -0.1, 0.1))
  </code></pre>
  
  <p>So far, so good.</p>
  
  <p>Now I need to look up each word's embedding for training. I assume it would be</p>
  
  <pre><code>tf.nn.embedding_lookup(U, word_index)
  </code></pre>
  
  <p>My question is because my embedding is a column vector, I need to look up like this <code>U[:,x[t]]</code> in numpy.</p>
  
  <p>How does TF figure out it needs to return the row OR column by word_index?</p>
  
  <p>What's the default? Row or column? 
  If it's a row vector, then do I need to transpose my embedding matrix?</p>
  
  <p><a href="https://www.tensorflow.org/api_docs/python/tf/nn/embedding_lookup" rel="nofollow noreferrer">https://www.tensorflow.org/api_docs/python/tf/nn/embedding_lookup</a>
  doesn't mention this. If anyone could point me to right resource, I'd appreciate it.</p>