返回张量轴上具有最小值的索引。 (不推荐使用的参数)
用法
tf.compat.v1.argmin(
input, axis=None, name=None, dimension=None, output_type=tf.dtypes.int64
)参数
-
input一个Tensor。必须是以下类型之一:float32,float64,int32,uint8,int16,int8,complex64,int64,qint8,quint8,qint32,bfloat16,uint16,complex128,half,uint32,uint64,bool。 -
axis一个Tensor。必须是以下类型之一:int32,int64。 int32 或 int64,必须在[-rank(input), rank(input))范围内。说明要减少输入张量的哪个轴。对于向量,使用axis = 0。 -
output_type一个可选的tf.DType来自:tf.int32, tf.int64。默认为tf.int64。 -
name操作的名称(可选)。
返回
-
Tensor类型为output_type。
警告:不推荐使用某些参数:(dimension)。它们将在未来的版本中被删除。更新说明:改用 axis 参数
请注意,在平局的情况下,不能保证返回值的身份。
用法:
import tensorflow as tf
a = [1, 10, 26.9, 2.8, 166.32, 62.3]
b = tf.math.argmin(input = a)
c = tf.keras.backend.eval(b)
# c = 0
# here a[0] = 1 which is the smallest element of a across axis 0
相关用法
- Python tf.compat.v1.argmax用法及代码示例
- Python tf.compat.v1.arg_max用法及代码示例
- Python tf.compat.v1.arg_min用法及代码示例
- Python tf.compat.v1.assert_none_equal用法及代码示例
- Python tf.compat.v1.assign_add用法及代码示例
- Python tf.compat.v1.autograph.to_graph用法及代码示例
- Python tf.compat.v1.assert_near用法及代码示例
- Python tf.compat.v1.assert_negative用法及代码示例
- Python tf.compat.v1.assert_less_equal用法及代码示例
- Python tf.compat.v1.assign用法及代码示例
- Python tf.compat.v1.assign_sub用法及代码示例
- Python tf.compat.v1.assert_non_positive用法及代码示例
- Python tf.compat.v1.assert_integer用法及代码示例
- Python tf.compat.v1.assert_greater用法及代码示例
- Python tf.compat.v1.assert_non_negative用法及代码示例
- Python tf.compat.v1.assert_rank_at_least用法及代码示例
- Python tf.compat.v1.assert_less用法及代码示例
- Python tf.compat.v1.assert_rank_in用法及代码示例
- Python tf.compat.v1.assert_greater_equal用法及代码示例
- Python tf.compat.v1.autograph.to_code用法及代码示例
注:本文由纯净天空筛选整理自tensorflow.org大神的英文原创作品 tf.compat.v1.argmin。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。
