@Namespace(value="tensorflow::ops") @NoOffset @Properties(inherit=tensorflow.class) public class SparseSegmentSumWithNumSegments extends Pointer
SparseSegmentSum
, but allows missing ids in segment_ids
. If an id is
misisng, the output
tensor at that position will be zeroed.
Read
[the section on segmentation](https://tensorflow.org/api_docs/python/tf/sparse#Segmentation)
for an explanation of segments.
For example:
python
c = tf.constant([[1,2,3,4], [-1,-2,-3,-4], [5,6,7,8]])
tf.sparse_segment_sum_with_num_segments(
c, tf.constant([0, 1]), tf.constant([0, 0]), num_segments=3)
# => [[0 0 0 0]
# [0 0 0 0]
# [0 0 0 0]]
tf.sparse_segment_sum_with_num_segments(c,
tf.constant([0, 1]),
tf.constant([0, 2],
num_segments=4))
# => [[ 1 2 3 4]
# [ 0 0 0 0]
# [-1 -2 -3 -4]
# [ 0 0 0 0]]
Arguments:
* scope: A Scope object
* indices: A 1-D tensor. Has same rank as segment_ids
.
* segment_ids: A 1-D tensor. Values should be sorted and can be repeated.
* num_segments: Should equal the number of distinct segment IDs.
Returns:
* Output
: Has same shape as data, except for dimension 0 which
has size num_segments
.Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter
Constructor and Description |
---|
SparseSegmentSumWithNumSegments(Pointer p)
Pointer cast constructor.
|
SparseSegmentSumWithNumSegments(Scope scope,
Input data,
Input indices,
Input segment_ids,
Input num_segments) |
Modifier and Type | Method and Description |
---|---|
Input |
asInput() |
Output |
asOutput() |
Node |
node() |
Operation |
operation() |
SparseSegmentSumWithNumSegments |
operation(Operation setter) |
Output |
output() |
SparseSegmentSumWithNumSegments |
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 SparseSegmentSumWithNumSegments(Pointer p)
Pointer(Pointer)
.public Node node()
public SparseSegmentSumWithNumSegments operation(Operation setter)
public SparseSegmentSumWithNumSegments output(Output setter)
Copyright © 2022. All rights reserved.