I have a 2-D array as:
c=np.array([[1, 3, 0, 0, 3],
[1, 3, 1, 0, 2],
[1, 3, 1, 2, 2]])
I want to calculate mode and mode-count along axis=0.
Therefore result should look like this:
mode = [1,3,1,0,2], mode-count=[3,3,2,2,2]
I have searched in the TensorFlow website, but cannot find any useful API other than tf.unique_with_counts, which expects a 1-D tensor.
I do not want to run a loop over each column of array c in order to use tf.unique_with_counts for computing mode and mode-count.
Any suggestions with examples are most welcome.