DLPrimitives
Public Member Functions | Static Public Member Functions | List of all members
dlprim::core::Pooling2DForward Class Referenceabstract

2d pooling More...

#include <include/dlprim/core/pool.hpp>

Public Member Functions

virtual size_t workspace ()=0
 
virtual void enqueue (Tensor &X, Tensor &Y, ExecutionContext const &e)=0
 when used with kernel based pooling (not global) X and Y 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
 

Static Public Member Functions

static std::unique_ptr< Pooling2DForwardcreate_max_pooling (Context &ctx, int kernel[2], int pad[2], int stride[2], DataType dt=float_data)
 Create max pooling for kernel, pad, stride.
 
static std::unique_ptr< Pooling2DForwardcreate_avg_pooling (Context &ctx, int kernel[2], int pad[2], int stride[2], bool count_include_pad=false, DataType dt=float_data)
 Create max pooling for kernel, pad, stride. More...
 
static std::unique_ptr< Pooling2DForwardcreate_global_max_pooling (Context &ctx, Shape const &in_shape, DataType dt=float_data)
 Max global pooling.
 
static std::unique_ptr< Pooling2DForwardcreate_global_avg_pooling (Context &ctx, Shape const &in_shape, DataType dt=float_data)
 Avergage global pooling.
 

Detailed Description

2d pooling

Member Function Documentation

static std::unique_ptr<Pooling2DForward> dlprim::core::Pooling2DForward::create_avg_pooling ( Context ctx,
int  kernel[2],
int  pad[2],
int  stride[2],
bool  count_include_pad = false,
DataType  dt = float_data 
)
static

Create max pooling for kernel, pad, stride.

if count_include_pad == true than average is normalized by sizeof kernel otherwise by actual amount of pixel participated


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