Caffe2 - C++ API
A deep learning, cross platform ML framework
Public Types | Static Public Member Functions | Static Public Attributes
caffe2::AbstractLengthsDef< T, SIndex, Context, ReducerDef, GradientNeedIndices > Struct Template Reference

Public Types

using OpDef = ReducerDef
 
using Reducer = typename ReducerDef::template Reducer< T, Context >
 
using ReducerGradient = typename ReducerDef::template ReducerGradient< T, Context >
 
using ForwardOp = AbstractLengthsOp< T, SIndex, Context, Reducer, false >
 
using BackwardOp = AbstractLengthsGradientOp< T, SIndex, Context, ReducerGradient >
 
using WithMainInputBackwardOp = AbstractLengthsWithMainInputGradientOp< T, T, SIndex, Context, ReducerGradient, false >
 
using WithMainInputAndForwardOutputBackwardOp = AbstractLengthsWithMainInputAndForwardOutputGradientOp< T, SIndex, Context, ReducerGradient >
 
using GetGradient = LengthsOpGetGradient< ForwardOp, ReducerDef, ReducerGradient, false, GradientNeedIndices >
 

Static Public Member Functions

static void PopulateSchema (OpSchema &schema)
 

Static Public Attributes

static constexpr const char * basename = "Lengths"
 
static constexpr const char * doc
 

Detailed Description

template<typename T, typename SIndex, typename Context, typename ReducerDef, bool GradientNeedIndices = false>
struct caffe2::AbstractLengthsDef< T, SIndex, Context, ReducerDef, GradientNeedIndices >

Definition at line 1884 of file segment_reduction_op.h.

Field Documentation

template<typename T , typename SIndex , typename Context , typename ReducerDef , bool GradientNeedIndices = false>
constexpr const char* caffe2::AbstractLengthsDef< T, SIndex, Context, ReducerDef, GradientNeedIndices >::doc
static
Initial value:
= R"DOC(
Applies '{op}' to each segment of the input tensor. Segments are defined
by their *LENGTHS*. *LENGTHS* is a vector that maps each of the slices of
*DATA* to a particular segment. Values belonging to the same segment are
aggregated together and considered for the '{op}' operation.
For example *LENGTHS = [2, 1]* stands for segments *DATA[0..1]* and *DATA[2]*
The sum of elements in *LENGTHS* must equal the number of elements in the first
dimension of *DATA*. The length of *OUTPUT* is equal to the number of input
segments, i.e. len(*LENGTHS*).
{op_doc}
{extra}
)DOC"

Definition at line 1887 of file segment_reduction_op.h.


The documentation for this struct was generated from the following file: