SegmentMean


tensorflow C++ API

tensorflow::ops::SegmentMean

Computes the mean 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}{N} wheremeanis overjsuch thatsegment_ids[j] == iandNis the total number of values summed.

If the mean 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

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

Public attributes

  • tensorflow::Output output.

SegmentMean 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 SegmentMean class object.

Result:

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

Using Method

results matching ""

    No results matching ""