@Namespace(value="tensorflow::ops") @NoOffset @Properties(inherit=tensorflow.class) public class UnsortedSegmentSum extends Pointer
j...
such
that segment_ids[j...] == i
. Unlike SegmentSum
, segment_ids
need not be sorted and need not cover all values in the full
range of valid values.
If the sum is empty for a given segment ID i
, output[i] = 0
.
If the given segment ID i
is negative, the value is dropped and will not be
added to the sum of the segment.
num_segments
should equal the number of distinct segment IDs.
python
c = tf.constant([[1,2,3,4], [5,6,7,8], [4,3,2,1]])
tf.unsorted_segment_sum(c, tf.constant([0, 1, 0]), num_segments=2)
# ==> [[ 5, 5, 5, 5],
# [5, 6, 7, 8]]
Arguments:
* scope: A Scope object
* segment_ids: A tensor whose shape is a prefix of data.shape
.
Returns:
* Output
: Has same shape as data, except for the first segment_ids.rank
dimensions, which are replaced with a single dimension which has size
num_segments
.Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter
Constructor and Description |
---|
UnsortedSegmentSum(Pointer p)
Pointer cast constructor.
|
UnsortedSegmentSum(Scope scope,
Input data,
Input segment_ids,
Input num_segments) |
Modifier and Type | Method and Description |
---|---|
Input |
asInput() |
Output |
asOutput() |
Node |
node() |
Operation |
operation() |
UnsortedSegmentSum |
operation(Operation setter) |
Output |
output() |
UnsortedSegmentSum |
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 UnsortedSegmentSum(Pointer p)
Pointer(Pointer)
.public Node node()
public UnsortedSegmentSum operation(Operation setter)
public UnsortedSegmentSum output(Output setter)
Copyright © 2022. All rights reserved.