SparseSegmentMean
tensorflow C++ API
tensorflow::ops::SparseSegmentMean
Computes the mean along sparse segments of a tensor.
Summary
Read the section on segmentation for an explanation of segments.
LikeSegmentMean
, butsegment_ids
can have rank less thandata
’s first dimension, selecting a subset of dimension 0, specified byindices
.
Arguments:
- scope: AScope 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 sizek
, the number of segments.
Constructor
- SparseSegmentMean(const ::tensorflow::Scope & scope, ::tensorflow::Input data, ::tensorflow::Input indices, ::tensorflow::Input segment_ids)
Public attributes
- tensorflow::Output output
SparseSegmentMean 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 indices : connect Input node.
- Input segment_ids: connect Input node.
Return:
- Output product : Output object of SparseSegmentMean class object.
Result:
- std::vector(Tensor) product_result : Returned object of executed result by calling session.