title: How to use tf.gather in batch?
body: <p>I have a <code>A = 10x1000</code> tensor and a <code>B = 10x1000</code> index tensor. The tensor B has values between 0-999 and it's used to gather values from A (<code>B[0,:]</code> gathers from <code>A[0,:]</code>, <code>B[1,:]</code> from <code>A[1,:]</code>, etc...).</p>
  
  <p>However, if I use <code>tf.gather(A, B)</code> I get an array of shape <code>(10, 1000, 1000)</code> when I'm expecting a <code>10x1000</code> tensor back. Any ideas how I could fix this?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>Let's say <code>A= [[1, 2, 3],[4,5,6]]</code> and <code>B = [[0, 1, 1],[2,1,0]]</code> What I want is to be able to sample A using the corresponding B. This should result in <code>C = [[1, 2, 2],[6,5,4]]</code>.</p>