SegmentSum


tensorflow C++ API

tensorflow::ops::SegmentSum

Computes the sum along segments of a tensor.


Summary

Read the section on segmentation for an explanation of segments.

Computes a tensor such that output_i = data_j where sum is overjsuch thatsegment_ids[j] == i.

If the sum is empty for a given segment IDi,output[i] = 0.

Arguments:

  • scope: A Scope object
  • segment_ids: A 1-D tensor whose rank is equal to the rank 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 sizek, the number of segments.

Constructor

  • SegmentSum(const ::tensorflow::Scope & scope, ::tensorflow::Input data, ::tensorflow::Input segment_ids)

Public attributes

  • tensorflow::Output output.

SegmentSum block

Source link : https://github.com/EXPNUNI/enuSpaceTensorflow/blob/master/enuSpaceTensorflow/tf_math.cpp

Argument:

  • Scope scope : A Scope object (A scope is generated automatically each page. A scope is not connected.).
  • Input data:connect Input node.
  • Input segment_ids:connect Input node.

Return:

  • Output output: Output object of SegmentSum class object.

Result:

  • std::vector(Tensor) product_result : Returned object of executed result by calling session.

Using Method

results matching ""

    No results matching ""