@Namespace(value="tensorflow::ops") @NoOffset @Properties(inherit=tensorflow.class) public class Gather extends Pointer
params
according to indices
.
indices
must be an integer tensor of any dimension (usually 0-D or 1-D).
Produces an output tensor with shape indices.shape + params.shape[1:]
where:
python
# Scalar indices
output[:, ..., :] = params[indices, :, ... :]
# Vector indices
output[i, :, ..., :] = params[indices[i], :, ... :]
# Higher rank indices
output[i, ..., j, :, ... :] = params[indices[i, ..., j], :, ..., :]
If indices
is a permutation and len(indices) == params.shape[0]
then
this operation will permute params
accordingly.
validate_indices
: DEPRECATED. If this operation is assigned to CPU, values in
indices
are always validated to be within range. If assigned to GPU,
out-of-bound indices result in safe but unspecified behavior, which may include
raising an error.
Output
: The output tensor.Modifier and Type | Class and Description |
---|---|
static class |
Gather.Attrs
Optional attribute setters for Gather
|
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter
Constructor and Description |
---|
Gather(Pointer p)
Pointer cast constructor.
|
Gather(Scope scope,
Input params,
Input indices) |
Gather(Scope scope,
Input params,
Input indices,
Gather.Attrs attrs) |
Modifier and Type | Method and Description |
---|---|
Input |
asInput() |
Output |
asOutput() |
Node |
node() |
Operation |
operation() |
Gather |
operation(Operation setter) |
Output |
output() |
Gather |
output(Output setter) |
static Gather.Attrs |
ValidateIndices(boolean x) |
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 Gather(Pointer p)
Pointer(Pointer)
.public Node node()
@ByVal public static Gather.Attrs ValidateIndices(@Cast(value="bool") boolean x)
Copyright © 2022. All rights reserved.