title: How do I select certain columns of a 2D tensor in TensorFlow?
body: <p>As generalized slicing is being worked on in <a href="https://github.com/tensorflow/tensorflow/issues/206" rel="noreferrer">this issue</a>, what would be the best way to achieve an op gathering columns of a 2D tensor (matrix)? For example, for tensor <code>t</code>:</p>
  
  <pre><code>1 2 3 4
  5 6 7 8 
  </code></pre>
  
  <p>and indices [1,3], I would like to get:</p>
  
  <pre><code>2 4
  6 8
  </code></pre>
  
  <p>which is equivalent to numpy <code>t[:, [1,3]]</code>.</p>