@Namespace(value="tensorflow::ops") @NoOffset @Properties(inherit=tensorflow.class) public class Unique extends Pointer
y
containing all of the unique elements of x
sorted in the same order that they occur in x
. This operation also returns a
tensor idx
the same size as x
that contains the index of each value of x
in the unique output y
. In other words:
y[idx[i]] = x[i] for i in [0, 1,...,rank(x) - 1]
For example:
# tensor 'x' is [1, 1, 2, 4, 4, 4, 7, 8, 8]
y, idx = unique(x)
y ==> [1, 2, 4, 7, 8]
idx ==> [0, 0, 1, 2, 2, 2, 3, 4, 4]
Arguments:
* scope: A Scope object
* x: 1-D.
Returns:
* Output
y: 1-D.
* Output
idx: 1-D.Modifier and Type | Class and Description |
---|---|
static class |
Unique.Attrs
Optional attribute setters for Unique
|
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter
Constructor and Description |
---|
Unique(Pointer p)
Pointer cast constructor.
|
Unique(Scope scope,
Input x) |
Unique(Scope scope,
Input x,
Unique.Attrs attrs) |
Modifier and Type | Method and Description |
---|---|
Output |
idx() |
Unique |
idx(Output setter) |
Operation |
operation() |
Unique |
operation(Operation setter) |
static Unique.Attrs |
OutIdx(int x) |
Output |
y() |
Unique |
y(Output setter) |
address, asBuffer, asByteBuffer, availablePhysicalBytes, calloc, capacity, capacity, close, deallocate, deallocate, deallocateReferences, deallocator, deallocator, equals, fill, formatBytes, free, getDirectBufferAddress, getPointer, getPointer, getPointer, getPointer, hashCode, interruptDeallocatorThread, isNull, isNull, limit, limit, malloc, maxBytes, maxPhysicalBytes, memchr, memcmp, memcpy, memmove, memset, offsetAddress, offsetof, offsetof, parseBytes, physicalBytes, physicalBytesInaccurate, position, position, put, realloc, referenceCount, releaseReference, retainReference, setNull, sizeof, sizeof, toString, totalBytes, totalCount, totalPhysicalBytes, withDeallocator, zero
public Unique(Pointer p)
Pointer(Pointer)
.@ByVal public static Unique.Attrs OutIdx(@Cast(value="tensorflow::DataType") int x)
Copyright © 2022. All rights reserved.