@Namespace(value="tensorflow::ops") @NoOffset public static class tensorflow.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_guides/python/math_ops#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| Constructor and Description |
|---|
SparseSegmentSumWithNumSegments(Pointer p)
Pointer cast constructor.
|
SparseSegmentSumWithNumSegments(tensorflow.Scope scope,
tensorflow.Input data,
tensorflow.Input indices,
tensorflow.Input segment_ids,
tensorflow.Input num_segments) |
| Modifier and Type | Method and Description |
|---|---|
tensorflow.Input |
asInput() |
tensorflow.Output |
asOutput() |
tensorflow.Node |
node() |
tensorflow.Operation |
operation() |
tensorflow.SparseSegmentSumWithNumSegments |
operation(tensorflow.Operation operation) |
tensorflow.Output |
output() |
tensorflow.SparseSegmentSumWithNumSegments |
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 SparseSegmentSumWithNumSegments(Pointer p)
Pointer.Pointer(Pointer).public SparseSegmentSumWithNumSegments(@Const @ByRef tensorflow.Scope scope, @ByVal tensorflow.Input data, @ByVal tensorflow.Input indices, @ByVal tensorflow.Input segment_ids, @ByVal tensorflow.Input num_segments)
@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.SparseSegmentSumWithNumSegments operation(tensorflow.Operation operation)
@ByRef public tensorflow.Output output()
public tensorflow.SparseSegmentSumWithNumSegments output(tensorflow.Output output)
Copyright © 2019. All rights reserved.