查找最后一个维度的 n - 阶统计值的值。
用法
tf.raw_ops.NthElement(
input, n, reverse=False, name=None
)参数
-
input一个Tensor。必须是以下类型之一:float32,float64,int32,uint8,int16,int8,int64,bfloat16,uint16,half,uint32,uint64。一维或更高,最后一维至少n+1。 -
nTensor类型为int32。 0-D。要沿最后一个维度选择的排序向量的位置(沿矩阵的每一行)。 n的有效范围是[0, input.shape[:-1]) -
reverse可选的bool。默认为False。当设置为 True 时,在向量中找到 nth-largest 值,反之亦然。 -
name操作的名称(可选)。
返回
-
一个
Tensor。具有与input相同的类型。
如果输入是向量(rank-1),则在向量中找到nth-smallest 值的条目,并将它们的值作为标量张量输出。
对于矩阵(分别是更高等级的输入),计算每行中的 nth-smallest 值(分别是沿最后一维的向量)的条目。因此,
values.shape = input.shape[:-1]
相关用法
- 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用法及代码示例
- Python tf.raw_ops.BitwiseAnd用法及代码示例
- Python tf.raw_ops.UniqueWithCounts用法及代码示例
- Python tf.raw_ops.DecodeGif用法及代码示例
- Python tf.raw_ops.Size用法及代码示例
- Python tf.raw_ops.ScatterUpdate用法及代码示例
- Python tf.raw_ops.ParallelConcat用法及代码示例
- Python tf.raw_ops.ScatterNdUpdate用法及代码示例
- Python tf.raw_ops.BatchToSpaceND用法及代码示例
- Python tf.raw_ops.TensorScatterMax用法及代码示例
- Python tf.raw_ops.DepthToSpace用法及代码示例
- Python tf.raw_ops.MutexLock用法及代码示例
注:本文由纯净天空筛选整理自tensorflow.org大神的英文原创作品 tf.raw_ops.NthElement。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。
