@Namespace(value="tensorflow::ops") @NoOffset @Properties(inherit=tensorflow.class) public class SegmentSum extends Pointer
j
such
that segment_ids[j] == i
.
If the sum is empty for a given segment ID i
, output[i] = 0
.
c = tf.constant([[1,2,3,4], [4, 3, 2, 1], [5,6,7,8]])
tf.segment_sum(c, tf.constant([0, 0, 1]))
# ==> [[5, 5, 5, 5],
# [5, 6, 7, 8]]
Arguments:
* scope: A Scope object
* segment_ids: A 1-D tensor whose size is equal to the size of data
's
first dimension. Values should be sorted and can be repeated.
Returns:
* Output
: Has same shape as data, except for dimension 0 which
has size k
, the number of segments.Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter
Constructor and Description |
---|
SegmentSum(Pointer p)
Pointer cast constructor.
|
SegmentSum(Scope scope,
Input data,
Input segment_ids) |
Modifier and Type | Method and Description |
---|---|
Input |
asInput() |
Output |
asOutput() |
Node |
node() |
Operation |
operation() |
SegmentSum |
operation(Operation setter) |
Output |
output() |
SegmentSum |
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 SegmentSum(Pointer p)
Pointer(Pointer)
.public Node node()
public SegmentSum operation(Operation setter)
public SegmentSum output(Output setter)
Copyright © 2022. All rights reserved.