public final class Pool
extends java.lang.Object
Block and methods for different pooling functions.| Modifier and Type | Method and Description |
|---|---|
static NDArray |
avgPool(NDArray data,
Shape kernel,
Shape stride,
Shape pad)
Performs Avg Pooling on the input.
|
static NDArray |
avgPool(NDArray data,
Shape kernel,
Shape stride,
Shape pad,
PoolingConvention poolingConvention,
boolean countIncludePad)
Performs Avg Pooling on the input.
|
static NDArray |
globalAvgPool(NDArray data)
Performs Global Avg Pooling on the input.
|
static NDArray |
globalLpPool(NDArray data,
int pValue)
Performs Global LP Pooling on the input.
|
static NDArray |
globalMaxPool(NDArray data)
Performs Global Max Pooling on the input.
|
static NDArray |
globalSumPool(NDArray data)
Performs Global Sum Pooling on the input.
|
static NDArray |
lpPool(NDArray data,
Shape kernel,
Shape stride,
Shape pad,
int pValue)
Performs LP Pooling on the input.
|
static NDArray |
lpPool(NDArray data,
Shape kernel,
Shape stride,
Shape pad,
PoolingConvention poolingConvention,
int pValue)
Performs LP Pooling on the input.
|
static NDArray |
maxPool(NDArray data,
Shape kernel,
Shape stride,
Shape pad)
Performs Max Pooling on the input.
|
static NDArray |
maxPool(NDArray data,
Shape kernel,
Shape stride,
Shape pad,
PoolingConvention poolingConvention)
Performs Max Pooling on the input.
|
static NDArray |
sumPool(NDArray data,
Shape kernel,
Shape stride,
Shape pad)
Performs Sum Pooling on the input.
|
static NDArray |
sumPool(NDArray data,
Shape kernel,
Shape stride,
Shape pad,
PoolingConvention poolingConvention)
Performs Sum Pooling on the input.
|
public static NDArray maxPool(NDArray data, Shape kernel, Shape stride, Shape pad, PoolingConvention poolingConvention)
data - the NDArray on which max pooling is performedkernel - the shape of the kernel to be usedstride - the stride to be used for each dimensionpad - the padding to be set in each dimensionpoolingConvention - the pooling convention to be usedpublic static NDArray maxPool(NDArray data, Shape kernel, Shape stride, Shape pad)
data - the NDArray on which max pooling is performedkernel - the shape of the kernel to be usedstride - the stride to be used for each dimensionpad - the padding to be set in each dimensionpublic static NDArray globalMaxPool(NDArray data)
data - the NDArray on which max pooling is performedpublic static NDArray sumPool(NDArray data, Shape kernel, Shape stride, Shape pad, PoolingConvention poolingConvention)
data - the NDArray on which sum pooling is performedkernel - the shape of the kernel to be usedstride - the stride to be used for each dimensionpad - the padding to be set in each dimensionpoolingConvention - the pooling convention to be usedpublic static NDArray sumPool(NDArray data, Shape kernel, Shape stride, Shape pad)
data - the NDArray on which sum pooling is performedkernel - the shape of the kernel to be usedstride - the stride to be used for each dimensionpad - the padding to be set in each dimensionpublic static NDArray globalSumPool(NDArray data)
data - the NDArray on which sum pooling is performedpublic static NDArray avgPool(NDArray data, Shape kernel, Shape stride, Shape pad, PoolingConvention poolingConvention, boolean countIncludePad)
data - the NDArray on which average pooling is performedkernel - the shape of the kernel to be usedstride - the stride to be used for each dimensionpad - the padding to be set in each dimensionpoolingConvention - the pooling convention to be usedcountIncludePad - whether to include padding for calculationspublic static NDArray avgPool(NDArray data, Shape kernel, Shape stride, Shape pad)
data - the NDArray on which average pooling is performedkernel - the shape of the kernel to be usedstride - the stride to be used for each dimensionpad - the padding to be set in each dimensionpublic static NDArray globalAvgPool(NDArray data)
data - the NDArray on which average pooling is performedpublic static NDArray lpPool(NDArray data, Shape kernel, Shape stride, Shape pad, PoolingConvention poolingConvention, int pValue)
data - the NDArray on which LP pooling is performedkernel - the shape of the kernel to be usedstride - the stride to be used for each dimensionpad - the padding to be set in each dimensionpoolingConvention - the pooling convention to be usedpValue - the power of the poolingpublic static NDArray lpPool(NDArray data, Shape kernel, Shape stride, Shape pad, int pValue)
data - the NDArray on which LP pooling is performedkernel - the shape of the kernel to be usedstride - the stride to be used for each dimensionpad - the padding to be set in each dimensionpValue - the power of the pooling