title: calculating mode and mode-count along an axis of a given tensor in tensorflow
body: <p>I have a 2-D array as:</p>
  
  <pre><code>c=np.array([[1, 3, 0, 0, 3],
              [1, 3, 1, 0, 2],
              [1, 3, 1, 2, 2]])
  </code></pre>
  
  <p>I want to calculate mode and mode-count along axis=0.<br>
  Therefore result should look like this:</p>
  
  <pre><code>mode = [1,3,1,0,2], mode-count=[3,3,2,2,2]
  </code></pre>
  
  <p>I have searched in the TensorFlow website, but cannot find any useful API other than 
  <a href="https://www.tensorflow.org/api_docs/python/tf/unique_with_counts" rel="nofollow noreferrer">tf.unique_with_counts</a>, which expects a 1-D tensor.</p>
  
  <p>I do not want to run a loop over each column of array <code>c</code> in order to use <code>tf.unique_with_counts</code> for computing mode and mode-count.<br>
  Any suggestions with examples are most welcome.</p>