title: Broadcasting np.dot vs tf.matmul for tensor-matrix multiplication (Shape must be rank 2 but is rank 3 error)
body: <p>Let's say I have the following tensors:</p>
  
  <pre><code>X = np.zeros((3,201, 340))
  Y = np.zeros((340, 28))
  </code></pre>
  
  <p>Making a dot product of X, Y is successful with numpy, and yields a tensor of shape (3, 201, 28).
  However with tensorflow I get the following error: <code>Shape must be rank 2 but is rank 3 error ...</code></p>
  
  <p>minimal code example:</p>
  
  <pre><code>X = np.zeros((3,201, 340))
  Y = np.zeros((340, 28))
  print(np.dot(X,Y).shape) # successful (3, 201, 28)
  tf.matmul(X, Y) # errornous
  </code></pre>
  
  <p>Any idea how to achieve the same result with tensorflow?</p>