@Namespace(value="tensorflow::ops") @NoOffset public static class tensorflow.SparseSegmentSum extends Pointer
SegmentSum, but segment_ids can have rank less than data's first
dimension, selecting a subset of dimension 0, specified by indices.
For example:
python
c = tf.constant([[1,2,3,4], [-1,-2,-3,-4], [5,6,7,8]])
# Select two rows, one segment.
tf.sparse_segment_sum(c, tf.constant([0, 1]), tf.constant([0, 0]))
# => [[0 0 0 0]]
# Select two rows, two segment.
tf.sparse_segment_sum(c, tf.constant([0, 1]), tf.constant([0, 1]))
# => [[ 1 2 3 4]
# [-1 -2 -3 -4]]
# Select all rows, two segments.
tf.sparse_segment_sum(c, tf.constant([0, 1, 2]), tf.constant([0, 0, 1]))
# => [[0 0 0 0]
# [5 6 7 8]]
# Which is equivalent to:
tf.segment_sum(c, tf.constant([0, 0, 1]))
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.
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| Constructor and Description |
|---|
SparseSegmentSum(Pointer p)
Pointer cast constructor.
|
SparseSegmentSum(tensorflow.Scope scope,
tensorflow.Input data,
tensorflow.Input indices,
tensorflow.Input segment_ids) |
| Modifier and Type | Method and Description |
|---|---|
tensorflow.Input |
asInput() |
tensorflow.Output |
asOutput() |
tensorflow.Node |
node() |
tensorflow.Operation |
operation() |
tensorflow.SparseSegmentSum |
operation(tensorflow.Operation operation) |
tensorflow.Output |
output() |
tensorflow.SparseSegmentSum |
output(tensorflow.Output output) |
address, asBuffer, asByteBuffer, availablePhysicalBytes, calloc, capacity, capacity, close, deallocate, deallocate, deallocateReferences, deallocator, deallocator, equals, fill, formatBytes, free, hashCode, isNull, limit, limit, malloc, maxBytes, maxPhysicalBytes, memchr, memcmp, memcpy, memmove, memset, offsetof, parseBytes, physicalBytes, position, position, put, realloc, setNull, sizeof, toString, totalBytes, totalPhysicalBytes, withDeallocator, zeropublic SparseSegmentSum(Pointer p)
Pointer.Pointer(Pointer).public SparseSegmentSum(@Const @ByRef tensorflow.Scope scope, @ByVal tensorflow.Input data, @ByVal tensorflow.Input indices, @ByVal tensorflow.Input segment_ids)
@ByVal @Name(value="operator tensorflow::Output") public tensorflow.Output asOutput()
@ByVal @Name(value="operator tensorflow::Input") public tensorflow.Input asInput()
public tensorflow.Node node()
@ByRef public tensorflow.Operation operation()
public tensorflow.SparseSegmentSum operation(tensorflow.Operation operation)
@ByRef public tensorflow.Output output()
public tensorflow.SparseSegmentSum output(tensorflow.Output output)
Copyright © 2019. All rights reserved.