返回跨张量维度的最大值的索引。
用法
tf.raw_ops.ArgMax(
input, dimension, output_type=tf.dtypes.int64, name=None
)参数
-
input一个Tensor。必须是以下类型之一:float32,float64,int32,uint8,int16,int8,complex64,int64,qint8,quint8,qint32,bfloat16,uint16,complex128,half,uint32,uint64,bool。 -
dimension一个Tensor。必须是以下类型之一:int32,int64。 int32 或 int64,必须在[-rank(input), rank(input))范围内。说明要减少的输入张量的维度。对于向量,使用维度 = 0。 -
output_type一个可选的tf.DType来自:tf.int32, tf.int64。默认为tf.int64。 -
name操作的名称(可选)。
返回
-
Tensor类型为output_type。
请注意,在平局的情况下,不能保证返回值的身份。
用法:
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
相关用法
- Python tf.raw_ops.ArgMin用法及代码示例
- Python tf.raw_ops.Atan2用法及代码示例
- Python tf.raw_ops.AddN用法及代码示例
- Python tf.raw_ops.Atan用法及代码示例
- Python tf.raw_ops.Asinh用法及代码示例
- Python tf.raw_ops.Angle用法及代码示例
- Python tf.raw_ops.Asin用法及代码示例
- Python tf.raw_ops.Atanh用法及代码示例
- Python tf.raw_ops.AssignVariableXlaConcatND用法及代码示例
- Python tf.raw_ops.Acosh用法及代码示例
- Python tf.raw_ops.AsString用法及代码示例
- Python tf.raw_ops.TPUReplicatedInput用法及代码示例
- Python tf.raw_ops.Bitcast用法及代码示例
- Python tf.raw_ops.SelfAdjointEigV2用法及代码示例
- Python tf.raw_ops.BatchMatMul用法及代码示例
- Python tf.raw_ops.OneHot用法及代码示例
- Python tf.raw_ops.ResourceScatterNdSub用法及代码示例
- Python tf.raw_ops.ReadVariableXlaSplitND用法及代码示例
- Python tf.raw_ops.GatherV2用法及代码示例
- Python tf.raw_ops.Expm1用法及代码示例
注:本文由纯净天空筛选整理自tensorflow.org大神的英文原创作品 tf.raw_ops.ArgMax。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。
