Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Index of a maximum element in TensorFlow tensor

How can I get index of a maximum element of a tensor along a selected axis in TensorFlow?

like image 819
Sergey S. Avatar asked May 08 '16 20:05

Sergey S.


1 Answers

Sorry, already figured that out. It is:

tf.argmax(input, axis, name=None)

https://www.tensorflow.org/api_docs/python/tf/argmax

like image 177
Sergey S. Avatar answered Sep 29 '22 15:09

Sergey S.