zl程序教程

您现在的位置是:首页 >  其它

当前栏目

tf.arg_max

max TF ARG
2023-09-14 09:09:28 时间

tf.arg_max ,返回最大值的索引

import tensorflow as tf
a = [1, 10, 26.9, 2.8, 166.32, 62.3]
b = tf.math.argmax(input = a)
c = tf.keras.backend.eval(b)
# c = 4
# here a[4] = 166.32 which is the largest element of a across axis 0