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, 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 1910 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 first dimension slices of the
DATA to a particular group (segment). Values belonging to the same segment are
aggregated together.
For example LENGTHS = [2, 1] stands for segments DATA[0..1] and DATA[2]
The first dimension of the output is equal to the number of input segments,
i.e. `len(LENGTHS)`. Other dimensions are inherited from the input tensor.
{op_doc}
)DOC"

Definition at line 1913 of file segment_reduction_op.h.


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