Returns the TopK unique values in the array in sorted order. The
running time is proportional to the product of K and the input size. Sorting the whole array is more efficient for sufficiently large values of K. The median-of-medians algorithm is probably faster, but difficult to implement efficiently in XLA. If there are fewer than K unique numbers (not NANs), the results are padded with negative infinity. NaNs are never returned. Subnormal numbers are flushed to zero. If an element appears at multiple indices, the highest index is returned. If a TopK element never appears in the input due to padding values, the indices are padded with negative one. If a padding value appears in the input and padding is needed, the highest index of the padding value will be returned. The semantics are not the same as kth_order_statistic.
Constants
String | OP_NAME | The name of this op, as known by TensorFlow core engine |
Public Methods
Inherited Methods
boolean |
equals(Object arg0)
|
final Class<?> |
getClass()
|
int |
hashCode()
|
final void |
notify()
|
final void |
notifyAll()
|
String |
toString()
|
final void |
wait(long arg0, int arg1)
|
final void |
wait(long arg0)
|
final void |
wait()
|
abstract ExecutionEnvironment |
env()
Return the execution environment this op was created in.
|
abstract Operation |
Constants
public static final String OP_NAME
The name of this op, as known by TensorFlow core engine
Public Methods
public static TopKUnique create (Scope scope, Operand<TFloat32> input, Long k)
Factory method to create a class wrapping a new TopKUnique operation.
Parameters
scope | current scope |
---|
Returns
- a new instance of TopKUnique