UnsortedSegmentMax
tensorflow C++ API
Computes the maximum along segments of a tensor.
Summary
Read the section on segmentation for an explanation of segments.
This operator is similar to theunsorted segment sum operator. Instead of computing the sum over segments, it computes the maximum such that:
output_i = data_j where max is overj
such thatsegment_ids[j] == i
.
If the maximum is empty for a given segment IDi
, it outputs the smallest possible value for specific numeric type,output[i] = numeric_limits::min()
.
Arguments:
- scope: A Scope object
- segment_ids: A 1-D tensor whose rank is equal to the rank of
data
's first dimension.
Returns:
Output
: Has same shape as data, except for dimension 0 which has sizenum_segments
.
Constructor
- UnsortedSegmentMax(const ::tensorflow::Scope & scope, ::tensorflow::Input data, ::tensorflow::Input segment_ids, ::tensorflow::Input num_segments)
Public attributes
- tensorflow::Output output.
UnsortedSegmentMax 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.
- Input num_segments : connect Input node.
Return:
- Output output: Output object of UnsortedSegmentMax class object.
Result:
- std::vector(Tensor) product_result : Returned object of executed result by calling session.