TopKWithUnique

public final class TopKWithUnique

Returns the TopK values in the array in sorted order. This is a combination

of MakeUnique and TopKUnique. The returned top-K will have its lower bits replaced by iota, thus it will be close to the original value but not exactly the same. The running time is proportional to the product of K and the input size. NaNs are never returned. Subnormal numbers are flushed to zero.

Public Methods

static TopKWithUnique
create(Scope scope, Operand<Float> input, Long k)
Factory method to create a class wrapping a new TopKWithUnique operation.
Output<Float>
topk()
Output<Integer>

Inherited Methods

Public Methods

public static TopKWithUnique create (Scope scope, Operand<Float> input, Long k)

Factory method to create a class wrapping a new TopKWithUnique operation.

Parameters
scope current scope
Returns
  • a new instance of TopKWithUnique

public Output<Float> topk ()

public Output<Integer> topkIndices ()