title: Tensorflow randomly sample from each row
body: <p>Suppose I have a tensor <code>A</code> of shape <code>(m, n)</code>, I would like to randomly sample <code>k</code> elements (without replacement) from each row, resulting in a tensor <code>B</code> of shape <code>(m, k)</code>. How to do that in tensorflow?</p>
  
  <p>An example would be:  </p>
  
  <p><code>A</code>: [[1,2,3], [4,5,6], [7,8,9], [10,11,12]]</p>
  
  <p><code>k</code>: 2</p>
  
  <p><code>B</code>: [[1,3],[5,6],[9,8],[12,10]]</p>