@Namespace(value="tensorflow::ops") @NoOffset @Properties(inherit=tensorflow.class) public class UnravelIndex extends Pointer
y = tf.unravel_index(indices=[2, 5, 7], dims=[3, 3])
# 'dims' represent a hypothetical (3, 3) tensor of indices:
# [[0, 1, *2*],
# [3, 4, *5*],
# [6, *7*, 8]]
# For each entry from 'indices', this operation returns
# its coordinates (marked with '*'), such as
# 2 ==> (0, 2)
# 5 ==> (1, 2)
# 7 ==> (2, 1)
y ==> [[0, 1, 2], [2, 2, 1]]
\compatibility(numpy)
Equivalent to np.unravel_index
\end_compatibility
Arguments:
* scope: A Scope object
* indices: An 0-D or 1-D int
Tensor whose elements are indices into the
flattened version of an array of dimensions dims.
* dims: An 1-D int
Tensor. The shape of the array to use for unraveling
indices.
Returns:
* Output
: An 2-D (or 1-D if indices is 0-D) tensor where each row has the
same shape as the indices array.Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter
Constructor and Description |
---|
UnravelIndex(Pointer p)
Pointer cast constructor.
|
UnravelIndex(Scope scope,
Input indices,
Input dims) |
Modifier and Type | Method and Description |
---|---|
Input |
asInput() |
Output |
asOutput() |
Node |
node() |
Operation |
operation() |
UnravelIndex |
operation(Operation setter) |
Output |
output() |
UnravelIndex |
output(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 UnravelIndex(Pointer p)
Pointer(Pointer)
.public Node node()
public UnravelIndex operation(Operation setter)
public UnravelIndex output(Output setter)
Copyright © 2022. All rights reserved.