@Namespace(value="tensorflow::ops") @NoOffset @Properties(inherit=tensorflow.class) public class GatherV2 extends Pointer
params
axis axis
according to indices
.
indices
must be an integer tensor of any dimension (usually 0-D or 1-D).
Produces an output tensor with shape params.shape[:axis] + indices.shape +
params.shape[axis + 1:]
where:
python
# Scalar indices (output is rank(params) - 1).
output[a_0, ..., a_n, b_0, ..., b_n] =
params[a_0, ..., a_n, indices, b_0, ..., b_n]
# Vector indices (output is rank(params)).
output[a_0, ..., a_n, i, b_0, ..., b_n] =
params[a_0, ..., a_n, indices[i], b_0, ..., b_n]
# Higher rank indices (output is rank(params) + rank(indices) - 1).
output[a_0, ..., a_n, i, ..., j, b_0, ... b_n] =
params[a_0, ..., a_n, indices[i, ..., j], b_0, ..., b_n]
tf.batch_gather
and tf.gather_nd
.
Arguments:
* scope: A Scope object
* params: The tensor from which to gather values. Must be at least rank
axis + 1
.
* indices: Index tensor. Must be in range [0, params.shape[axis])
.
* axis: The axis in params
to gather indices
from. Defaults to the first
dimension. Supports negative indexes.
Returns:
* Output
: Values from params
gathered from indices given by indices
, with
shape params.shape[:axis] + indices.shape + params.shape[axis + 1:]
.Modifier and Type | Class and Description |
---|---|
static class |
GatherV2.Attrs
Optional attribute setters for GatherV2
|
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter
Constructor and Description |
---|
GatherV2(Pointer p)
Pointer cast constructor.
|
GatherV2(Scope scope,
Input params,
Input indices,
Input axis) |
GatherV2(Scope scope,
Input params,
Input indices,
Input axis,
GatherV2.Attrs attrs) |
Modifier and Type | Method and Description |
---|---|
Input |
asInput() |
Output |
asOutput() |
static GatherV2.Attrs |
BatchDims(long x) |
Node |
node() |
Operation |
operation() |
GatherV2 |
operation(Operation setter) |
Output |
output() |
GatherV2 |
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 GatherV2(Pointer p)
Pointer(Pointer)
.public GatherV2(@Const @ByRef Scope scope, @ByVal Input params, @ByVal Input indices, @ByVal Input axis)
public Node node()
@ByVal public static GatherV2.Attrs BatchDims(@Cast(value="tensorflow::int64") long x)
Copyright © 2022. All rights reserved.