@Namespace(value="tensorflow::ops") @NoOffset @Properties(inherit=tensorflow.class) public class ScatterUpdate extends Pointer
python
# Scalar indices
ref[indices, ...] = updates[...]
# Vector indices (for each i)
ref[indices[i], ...] = updates[i, ...]
# High rank indices (for each i, ..., j)
ref[indices[i, ..., j], ...] = updates[i, ..., j, ...]
This operation outputs ref
after the update is done.
This makes it easier to chain operations that need to use the reset value.
If values in ref
is to be updated more than once, because there are
duplicate entries in indices
, the order at which the updates happen
for each value is undefined.
Requires updates.shape = indices.shape + ref.shape[1:]
or updates.shape = []
.
tf.batch_scatter_update
and tf.scatter_nd_update
.
Arguments:
* scope: A Scope object
* ref: Should be from a Variable
node.
* indices: A tensor of indices into the first dimension of ref
.
* updates: A tensor of updated values to store in ref
.
Optional attributes (see Attrs
):
* use_locking: If True, the assignment will be protected by a lock;
otherwise the behavior is undefined, but may exhibit less contention.
Returns:
* Output
: = Same as ref
. Returned as a convenience for operations that want
to use the updated values after the update is done.Modifier and Type | Class and Description |
---|---|
static class |
ScatterUpdate.Attrs
Optional attribute setters for ScatterUpdate
|
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter
Constructor and Description |
---|
ScatterUpdate(Pointer p)
Pointer cast constructor.
|
ScatterUpdate(Scope scope,
Input ref,
Input indices,
Input updates) |
ScatterUpdate(Scope scope,
Input ref,
Input indices,
Input updates,
ScatterUpdate.Attrs attrs) |
Modifier and Type | Method and Description |
---|---|
Input |
asInput() |
Output |
asOutput() |
Node |
node() |
Operation |
operation() |
ScatterUpdate |
operation(Operation setter) |
Output |
output_ref() |
ScatterUpdate |
output_ref(Output setter) |
static ScatterUpdate.Attrs |
UseLocking(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 ScatterUpdate(Pointer p)
Pointer(Pointer)
.public ScatterUpdate(@Const @ByRef Scope scope, @ByVal Input ref, @ByVal Input indices, @ByVal Input updates)
public Node node()
@ByVal public static ScatterUpdate.Attrs UseLocking(@Cast(value="bool") boolean x)
public ScatterUpdate operation(Operation setter)
public ScatterUpdate output_ref(Output setter)
Copyright © 2022. All rights reserved.