DLPrimitives
Public Member Functions | Static Public Member Functions | List of all members
dlprim::core::AvgPooling2DBackward Class Referenceabstract
Inheritance diagram for dlprim::core::AvgPooling2DBackward:
dlprim::core::Pooling2DBackwardBase

Public Member Functions

virtual void enqueue (Tensor &, Tensor &dX, Tensor &dY, float factor, ExecutionContext const &e)
 for Avg pooling we don't need X so you can call directrly enqueue(dX,dY,factor,e) More...
 
virtual void enqueue (Tensor &dX, Tensor &dY, float factor, ExecutionContext const &e)=0
 actual computation, no need X for backward propogation More...
 
- Public Member Functions inherited from dlprim::core::Pooling2DBackwardBase
virtual size_t workspace ()=0
 get workspace
 

Static Public Member Functions

static std::unique_ptr< AvgPooling2DBackwardcreate (Context &ctx, int kernel[2], int pad[2], int stride[2], bool count_include_pad=false, DataType dt=float_data)
 Create average pooling with kernel.
 
static std::unique_ptr< AvgPooling2DBackwardcreate_global (Context &ctx, Shape const &in_shape, DataType dt=float_data)
 Create global average pooling.
 

Member Function Documentation

virtual void dlprim::core::AvgPooling2DBackward::enqueue ( Tensor ,
Tensor dX,
Tensor dY,
float  factor,
ExecutionContext const &  e 
)
inlinevirtual

for Avg pooling we don't need X so you can call directrly enqueue(dX,dY,factor,e)

when used with kernel based pooling (not global) dX and dY dimensions should match at batch and channels and for H/W the dimention for Y should be Y_dim = op((X_dim + 2 * pad[dim] - kernel[dim]) / stride[dim]) + 1 where op is either ceil or floor

Implements dlprim::core::Pooling2DBackwardBase.

References dlprim::core::Pooling2DForward::enqueue().

virtual void dlprim::core::AvgPooling2DBackward::enqueue ( Tensor dX,
Tensor dY,
float  factor,
ExecutionContext const &  e 
)
pure virtual

actual computation, no need X for backward propogation

when used with kernel based pooling (not global) dX and dY dimensions should match at batch and channels and for H/W the dimention for Y should be Y_dim = op((X_dim + 2 * pad[dim] - kernel[dim]) / stride[dim]) + 1 where op is either ceil or floor


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