tvm
|
Pooling op constructions. More...
#include <tvm/arith/analyzer.h>
#include <tvm/topi/detail/pad_utils.h>
#include <tvm/topi/nn.h>
#include <tvm/topi/reduction.h>
#include <tvm/topi/tags.h>
#include <algorithm>
#include <string>
#include <vector>
Go to the source code of this file.
Namespaces | |
tvm | |
runtime implementation for LibTorch/TorchScript. | |
tvm::topi | |
tvm::topi::nn | |
Enumerations | |
enum | tvm::topi::nn::PoolType : int { tvm::topi::nn::kAvgPool , tvm::topi::nn::kMaxPool } |
Pooling type. More... | |
Functions | |
Tensor | tvm::topi::nn::pool_grad_impl (const Tensor &out_grad, const Tensor &x, const Array< PrimExpr > &kernel_size, const Array< PrimExpr > &stride_size, const Array< PrimExpr > &padding_size, PoolType pool_type, bool ceil_mode, const size_t height_axis, const size_t width_axis, bool count_include_pad) |
bool | tvm::topi::nn::find_depth_height_width (const std::string &layout, int *depth_axis, int *height_axis, int *width_axis) |
Find index of Depth, Height or Width dimension in a layout string. More... | |
bool | tvm::topi::nn::find_height_width (const std::string &layout, int *height_axis, int *width_axis) |
bool | tvm::topi::nn::find_width (const std::string &layout, int *width_axis) |
Tensor | tvm::topi::nn::pool_grad (const Tensor &out_grad, const Tensor &x, const Array< PrimExpr > &kernel_size, const Array< PrimExpr > &stride_size, const Array< PrimExpr > &padding_size, PoolType pool_type, bool ceil_mode, const std::string &layout="NCHW", bool count_include_pad=true) |
Calculate gradient of pooling on height and width dimension of data. It decides the height and width dimension according to the layout string, in which 'W' and 'H' means width and height respectively. Width and height dimension cannot be split. For example, NCHW, NCHW16c, etc. are valid for pool, while NCHW16w, NCHW16h are not. See layout for more information of the layout string convention. More... | |
PrimExpr | tvm::topi::nn::start_index (const Var &out_index, const PrimExpr &odim, const PrimExpr &idim) |
PrimExpr | tvm::topi::nn::end_index (const Var &out_index, const PrimExpr &odim, const PrimExpr &idim) |
Tensor | tvm::topi::nn::adaptive_pool_impl (const Tensor &x, const Array< PrimExpr > &output_size, PoolType pool_type, const std::vector< int > &axes) |
Perform adaptive pooling on N dimensional data. More... | |
Tensor | tvm::topi::nn::adaptive_pool (const Tensor &x, const Array< PrimExpr > &output_size, PoolType pool_type, const std::string &layout="NCHW") |
Adaptively perform pooling on height and width dimension of data. The pooling kernel and stride sizes are automatically chosen for desired output sizes. It decides the height and width dimension according to the layout string, in which 'W' and 'H' means width and height respectively. Width and height dimension cannot be split. For example, NCHW, NCHW16c, etc. are valid for pool, while NCHW16w, NCHW16h are not. See layout for more information of the layout string convention. More... | |
Tensor | tvm::topi::nn::adaptive_pool3d (const Tensor &x, const Array< PrimExpr > &output_size, PoolType pool_type, const std::string &layout="NCDHW") |
Adaptively perform pooling on three dimensional data. See the two dimensional version above for details. More... | |
Tensor | tvm::topi::nn::adaptive_pool1d (const Tensor &x, const Array< PrimExpr > &output_size, PoolType pool_type, const std::string &layout="NCW") |
Adaptively perform pooling on one dimensional data. See the two dimensional version above for details. More... | |
Tensor | tvm::topi::nn::global_pool (const Tensor &x, PoolType pool_type, const std::string &layout="NCHW") |
Perform global pooling on height and width dimension of data. It decides the height and width dimension according to the layout string, in which 'W' and 'H' means width and height respectively. Width and height dimension cannot be split. For example, NCHW, NCHW16c, ... are valid for global_pool, while NCHW16w, NCHW16h are not. See layout for more information of the layout string convention. More... | |
Tensor | tvm::topi::nn::pool_impl_nd (const Tensor &x, const Array< PrimExpr > &kernel_size, const Array< PrimExpr > &stride_size, const Array< PrimExpr > &dilation_size, const Array< PrimExpr > &padding_size, PoolType pool_type, bool ceil_mode, const std::vector< int > &axis, bool count_include_pad) |
Perform pooling on N-dimension of data. More... | |
Tensor | tvm::topi::nn::pool1d (const Tensor &x, const Array< PrimExpr > &kernel_size, const Array< PrimExpr > &stride_size, const Array< PrimExpr > &dilation_size, const Array< PrimExpr > &padding_size, PoolType pool_type, bool ceil_mode, const std::string &layout="NCW", bool count_include_pad=true) |
Perform pooling on the width dimension of data. Width axis is determined by the layout string in which 'W' means width. Width dimension cannot be split. For example, NCW, NCW16c, etc. are valid for pool, while NCW16w is not. See layout for more information of the layout string convention. More... | |
Tensor | tvm::topi::nn::pool2d (const Tensor &x, const Array< PrimExpr > &kernel_size, const Array< PrimExpr > &stride_size, const Array< PrimExpr > &dilation_size, const Array< PrimExpr > &padding_size, PoolType pool_type, bool ceil_mode, const std::string &layout="NCHW", bool count_include_pad=true) |
Perform pooling on height and width dimension of data. It decides the height and width dimension according to the layout string, in which 'W' and 'H' means width and height respectively. Width and height dimension cannot be split. For example, NCHW, NCHW16c, etc. are valid for pool, while NCHW16w, NCHW16h are not. See layout for more information of the layout string convention. More... | |
Tensor | tvm::topi::nn::pool3d (const Tensor &x, const Array< PrimExpr > &kernel_size, const Array< PrimExpr > &stride_size, const Array< PrimExpr > &dilation_size, const Array< PrimExpr > &padding_size, PoolType pool_type, bool ceil_mode, const std::string &layout="NCDHW", bool count_include_pad=true) |
Perform pooling on depth, height and width dimension of data. It decides the depth, height and width dimension according to the layout string, in which 'D', 'W' and 'H' means depth, width and height respectively. Depth, Width and height dimension cannot be split. For example, NCDHW, NCDHW16c, etc. are valid for pool, while NCDHW16d, NCDHW16w or NCDHW16h are not. See layout for more information of the layout string convention. More... | |
Pooling op constructions.