title: tensorflow element-wise matrix multiplication
body: <p>Say I have two tensors in tensorflow, with the first dimension representing the index of a training example in a batch, and the others representing some vectors of matrices of data.  Eg</p>
  
  <pre><code>vector_batch = tf.ones([64, 50])
  matrix_batch = tf.ones([64, 50, 50])
  </code></pre>
  
  <p>I'm curious what the most idiomatic way to perform a vector*matrix multiply, for each of the pairs of vectors, matrices that share an index along the first dimension.</p>
  
  <p>Aka a the most idiomatic way to write:</p>
  
  <pre><code>result = tf.empty([64,50])
  for i in range(64):
      result[i,:] = tf.matmul(vector_batch[i,:], matrix_batch[i,:,:])
  </code></pre>
  
  <p>What would be the best way to organize the shape of the input vectors to make this process as simple/clean as possible?</p>