1-D or higher tf.Tensor with last dimension being at least k.
Optional k: numberNumber of top elements to look for along the last dimension.
Optional sorted: booleanIf true, the resulting k elements will be sorted by the
values in descending order.
Generated using TypeDoc
Finds the values and indices of the
klargest entries along the last dimension.If the input is a vector (rank=1), finds the k largest entries in the vector and outputs their values and indices as vectors. Thus values[j] is the j-th largest entry in input, and its index is indices[j]. For higher rank inputs, computes the top k entries along the last dimension.
If two elements are equal, the lower-index element appears first.