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 Block |
avgPool1DBlock(Shape kernel)
Creates a
LambdaBlock that applies the avgPool1DBlock pooling function in its forward function. |
static Block |
avgPool1DBlock(Shape kernel,
Shape stride)
Creates a
LambdaBlock that applies the avgPool1DBlock pooling function in its forward function. |
static Block |
avgPool1DBlock(Shape kernel,
Shape stride,
Shape pad)
Creates a
LambdaBlock that applies the avgPool1DBlock pooling function in its forward function. |
static Block |
avgPool1DBlock(Shape kernel,
Shape stride,
Shape pad,
PoolingConvention poolingConvention)
Creates a
LambdaBlock that applies the avgPool1DBlock pooling function in its forward function. |
static Block |
avgPool1DBlock(Shape kernel,
Shape stride,
Shape pad,
PoolingConvention poolingConvention,
boolean countIncludePad)
Creates a
LambdaBlock that applies the avgPool1DBlock pooling function in its forward function. |
static Block |
avgPool2DBlock(Shape kernel)
Creates a
LambdaBlock that applies the avgPool2DBlock pooling function in its forward function. |
static Block |
avgPool2DBlock(Shape kernel,
Shape stride)
Creates a
LambdaBlock that applies the avgPool2DBlock pooling function in its forward function. |
static Block |
avgPool2DBlock(Shape kernel,
Shape stride,
Shape pad)
Creates a
LambdaBlock that applies the avgPool2DBlock pooling function in its forward function. |
static Block |
avgPool2DBlock(Shape kernel,
Shape stride,
Shape pad,
PoolingConvention poolingConvention)
Creates a
LambdaBlock that applies the avgPool2DBlock pooling function in its forward function. |
static Block |
avgPool2DBlock(Shape kernel,
Shape stride,
Shape pad,
PoolingConvention poolingConvention,
boolean countIncludePad)
Creates a
LambdaBlock that applies the avgPool2DBlock pooling function in its forward function. |
static Block |
avgPool3DBlock(Shape kernel)
Creates a
LambdaBlock that applies the avgPool3DBlock pooling function in its forward function. |
static Block |
avgPool3DBlock(Shape kernel,
Shape stride)
Creates a
LambdaBlock that applies the avgPool3DBlock pooling function in its forward function. |
static Block |
avgPool3DBlock(Shape kernel,
Shape stride,
Shape pad)
Creates a
LambdaBlock that applies the avgPool3DBlock pooling function in its forward function. |
static Block |
avgPool3DBlock(Shape kernel,
Shape stride,
Shape pad,
PoolingConvention poolingConvention)
Creates a
LambdaBlock that applies the avgPool3DBlock pooling function in its forward function. |
static Block |
avgPool3DBlock(Shape kernel,
Shape stride,
Shape pad,
PoolingConvention poolingConvention,
boolean countIncludePad)
Creates a
LambdaBlock that applies the avgPool3DBlock pooling function in its forward function. |
static Block |
globalAvgPool1DBlock()
Creates a
LambdaBlock that applies the globalAvgPool1D
pooling function. |
static Block |
globalAvgPool2DBlock()
Creates a
LambdaBlock that applies the globalAvgPool2D
pooling function. |
static Block |
globalAvgPool3DBlock()
Creates a
LambdaBlock that applies the globalAvgPool3D
pooling function. |
static Block |
globalLpPool1DBlock(int pValue)
Creates a
LambdaBlock that applies the globalLpPool1D pooling function. |
static Block |
globalLpPool2DBlock(int pValue)
Creates a
LambdaBlock that applies the globalLpPool2D pooling function. |
static Block |
globalLpPool3DBlock(int pValue)
Creates a
LambdaBlock that applies the globalLpPool3D pooling function. |
static Block |
globalMaxPool1DBlock()
Creates a
LambdaBlock that applies the globalmaxPool1DBlock pooling function. |
static Block |
globalMaxPool2DBlock()
Creates a
LambdaBlock that applies the globalmaxPool2DBlock pooling function. |
static Block |
globalMaxPool3DBlock()
Creates a
LambdaBlock that applies the globalmaxPool3DBlock pooling function. |
static Block |
lpPool1DBlock(Shape kernel,
int pValue)
Creates a
LambdaBlock that applies the lpPool1DBlock pooling function in its forward function. |
static Block |
lpPool1DBlock(Shape kernel,
Shape stride,
int pValue)
Creates a
LambdaBlock that applies the lpPool1DBlock pooling function in its forward function. |
static Block |
lpPool1DBlock(Shape kernel,
Shape stride,
Shape pad,
int pValue)
Creates a
LambdaBlock that applies the lpPool1DBlock pooling function in its forward function. |
static Block |
lpPool1DBlock(Shape kernel,
Shape stride,
Shape pad,
PoolingConvention poolingConvention,
int pValue)
Creates a
LambdaBlock that applies the lpPool1DBlock pooling function in its forward function. |
static Block |
lpPool2DBlock(Shape kernel,
int pValue)
Creates a
LambdaBlock that applies the lpPool2DBlock pooling function in its forward function. |
static Block |
lpPool2DBlock(Shape kernel,
Shape stride,
int pValue)
Creates a
LambdaBlock that applies the lpPool2DBlock pooling function in its forward function. |
static Block |
lpPool2DBlock(Shape kernel,
Shape stride,
Shape pad,
int pValue)
Creates a
LambdaBlock that applies the lpPool2DBlock pooling function in its forward function. |
static Block |
lpPool2DBlock(Shape kernel,
Shape stride,
Shape pad,
PoolingConvention poolingConvention,
int pValue)
Creates a
LambdaBlock that applies the lpPool2DBlock pooling function in its forward function. |
static Block |
lpPool3DBlock(Shape kernel,
int pValue)
Creates a
LambdaBlock that applies the lpPool3DBlock pooling function in its forward function. |
static Block |
lpPool3DBlock(Shape kernel,
Shape stride,
int pValue)
Creates a
LambdaBlock that applies the LpPoo3D pooling function in its forward function. |
static Block |
lpPool3DBlock(Shape kernel,
Shape stride,
Shape pad,
int pValue)
Creates a
LambdaBlock that applies the lpPool3DBlock pooling function in its forward function. |
static Block |
lpPool3DBlock(Shape kernel,
Shape stride,
Shape pad,
PoolingConvention poolingConvention,
int pValue)
Creates a
LambdaBlock that applies the lpPool3DBlock pooling function in its forward function. |
static Block |
maxPool1DBlock(Shape kernel)
Creates a
LambdaBlock that applies the maxPool1DBlock pooling function in its forward function. |
static Block |
maxPool1DBlock(Shape kernel,
Shape stride)
Creates a
LambdaBlock that applies the maxPool1DBlock pooling function in its forward function. |
static Block |
maxPool1DBlock(Shape kernel,
Shape stride,
Shape pad)
Creates a
LambdaBlock that applies the maxPool1DBlock pooling function in its forward function. |
static Block |
maxPool1DBlock(Shape kernel,
Shape stride,
Shape pad,
PoolingConvention poolingConvention)
Creates a
LambdaBlock that applies the maxPool1D pooling function in its forward function. |
static Block |
maxPool2DBlock(Shape kernel)
Creates a
LambdaBlock that applies the maxPool2DBlock pooling function in its forward function. |
static Block |
maxPool2DBlock(Shape kernel,
Shape stride)
Creates a
LambdaBlock that applies the maxPool2DBlock pooling function in its forward function. |
static Block |
maxPool2DBlock(Shape kernel,
Shape stride,
Shape pad)
Creates a
LambdaBlock that applies the maxPool2DBlock pooling function in its forward function. |
static Block |
maxPool2DBlock(Shape kernel,
Shape stride,
Shape pad,
PoolingConvention poolingConvention)
Creates a
LambdaBlock that applies the maxPool2DBlock pooling function in its forward function. |
static Block |
maxPool3DBlock(Shape kernel)
Creates a
LambdaBlock that applies the maxPool3DBlock pooling function in its forward function. |
static Block |
maxPool3DBlock(Shape kernel,
Shape stride)
Creates a
LambdaBlock that applies the maxPool3DBlock pooling function in its forward function. |
static Block |
maxPool3DBlock(Shape kernel,
Shape stride,
Shape pad)
Creates a
LambdaBlock that applies the maxPool3DBlock pooling function in its forward function. |
static Block |
maxPool3DBlock(Shape kernel,
Shape stride,
Shape pad,
PoolingConvention poolingConvention)
Creates a
LambdaBlock that applies the maxPool3DBlock pooling function in its forward function. |
public 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 Block maxPool1DBlock(Shape kernel, Shape stride, Shape pad, PoolingConvention poolingConvention)
LambdaBlock
that applies the maxPool1D
pooling function in its forward function.kernel
- kernel of pooling layerstride
- stride of pooling layerpad
- pad of the pooling layerpoolingConvention
- PoolingConvention (VALID vs FULL)LambdaBlock
that applies the maxPool1DBlock
activation functionpublic static Block maxPool1DBlock(Shape kernel, Shape stride, Shape pad)
LambdaBlock
that applies the maxPool1DBlock
pooling function in its forward function.kernel
- kernel of pooling layerstride
- stride of pooling layerpad
- pad of the pooling layerLambdaBlock
that applies the maxPool1DBlock
activation functionpublic static Block maxPool1DBlock(Shape kernel, Shape stride)
LambdaBlock
that applies the maxPool1DBlock
pooling function in its forward function.kernel
- kernel of pooling layerstride
- stride of pooling layerLambdaBlock
that applies the maxPool1DBlock
activation functionpublic static Block maxPool1DBlock(Shape kernel)
LambdaBlock
that applies the maxPool1DBlock
pooling function in its forward function.kernel
- kernel of pooling layerLambdaBlock
that applies the maxPool1DBlock
activation functionpublic static Block maxPool2DBlock(Shape kernel, Shape stride, Shape pad, PoolingConvention poolingConvention)
LambdaBlock
that applies the maxPool2DBlock
pooling function in its forward function.kernel
- kernel of pooling layerstride
- stride of pooling layerpad
- pad of the pooling layerpoolingConvention
- PoolingConvention (VALID vs FULL)LambdaBlock
that applies the maxPool2DBlock
activation functionpublic static Block maxPool2DBlock(Shape kernel, Shape stride, Shape pad)
LambdaBlock
that applies the maxPool2DBlock
pooling function in its forward function.kernel
- kernel of pooling layerstride
- stride of pooling layerpad
- pad of the pooling layerLambdaBlock
that applies the maxPool2DBlock
activation functionpublic static Block maxPool2DBlock(Shape kernel, Shape stride)
LambdaBlock
that applies the maxPool2DBlock
pooling function in its forward function.kernel
- kernel of pooling layerstride
- stride of pooling layerLambdaBlock
that applies the maxPool2DBlock
activation functionpublic static Block maxPool2DBlock(Shape kernel)
LambdaBlock
that applies the maxPool2DBlock
pooling function in its forward function.kernel
- kernel of pooling layerLambdaBlock
that applies the maxPool2DBlock
activation functionpublic static Block maxPool3DBlock(Shape kernel, Shape stride, Shape pad, PoolingConvention poolingConvention)
LambdaBlock
that applies the maxPool3DBlock
pooling function in its forward function.kernel
- kernel of pooling layerstride
- stride of pooling layerpad
- pad of the pooling layerpoolingConvention
- PoolingConvention (VALID vs FULL)LambdaBlock
that applies the maxPool3DBlock
activation functionpublic static Block maxPool3DBlock(Shape kernel, Shape stride, Shape pad)
LambdaBlock
that applies the maxPool3DBlock
pooling function in its forward function.kernel
- kernel of pooling layerstride
- stride of pooling layerpad
- pad of the pooling layerLambdaBlock
that applies the maxPool3DBlock
activation functionpublic static Block maxPool3DBlock(Shape kernel, Shape stride)
LambdaBlock
that applies the maxPool3DBlock
pooling function in its forward function.kernel
- kernel of pooling layerstride
- stride of pooling layerLambdaBlock
that applies the maxPool3DBlock
activation functionpublic static Block maxPool3DBlock(Shape kernel)
LambdaBlock
that applies the maxPool3DBlock
pooling function in its forward function.kernel
- kernel of pooling layerLambdaBlock
that applies the maxPool3DBlock
activation functionpublic static Block globalMaxPool1DBlock()
LambdaBlock
that applies the globalmaxPool1DBlock
pooling function.LambdaBlock
that applies the globalmaxPool1DBlock
pooling functionpublic static Block globalMaxPool2DBlock()
LambdaBlock
that applies the globalmaxPool2DBlock
pooling function.LambdaBlock
that applies the globalmaxPool2DBlock
pooling functionpublic static Block globalMaxPool3DBlock()
LambdaBlock
that applies the globalmaxPool3DBlock
pooling function.LambdaBlock
that applies the globalmaxPool3DBlock
pooling functionpublic static Block avgPool1DBlock(Shape kernel, Shape stride, Shape pad, PoolingConvention poolingConvention, boolean countIncludePad)
LambdaBlock
that applies the avgPool1DBlock
pooling function in its forward function.kernel
- kernel of pooling layerstride
- stride of pooling layerpad
- pad of the pooling layerpoolingConvention
- PoolingConvention (VALID vs FULL)countIncludePad
- Boolean indicating whether to include padding for calculationsLambdaBlock
that applies the avgPool1DBlock
activation functionpublic static Block avgPool1DBlock(Shape kernel, Shape stride, Shape pad, PoolingConvention poolingConvention)
LambdaBlock
that applies the avgPool1DBlock
pooling function in its forward function.kernel
- kernel of pooling layerstride
- stride of pooling layerpad
- pad of the pooling layerpoolingConvention
- PoolingConvention (VALID vs FULL)LambdaBlock
that applies the avgPool1DBlock
activation functionpublic static Block avgPool1DBlock(Shape kernel, Shape stride, Shape pad)
LambdaBlock
that applies the avgPool1DBlock
pooling function in its forward function.kernel
- kernel of pooling layerstride
- stride of pooling layerpad
- pad of the pooling layerLambdaBlock
that applies the avgPool1DBlock
activation functionpublic static Block avgPool1DBlock(Shape kernel, Shape stride)
LambdaBlock
that applies the avgPool1DBlock
pooling function in its forward function.kernel
- kernel of pooling layerstride
- stride of pooling layerLambdaBlock
that applies the avgPool1DBlock
activation functionpublic static Block avgPool1DBlock(Shape kernel)
LambdaBlock
that applies the avgPool1DBlock
pooling function in its forward function.kernel
- kernel of pooling layerLambdaBlock
that applies the avgPool1DBlock
activation functionpublic static Block avgPool2DBlock(Shape kernel, Shape stride, Shape pad, PoolingConvention poolingConvention, boolean countIncludePad)
LambdaBlock
that applies the avgPool2DBlock
pooling function in its forward function.kernel
- kernel of pooling layerstride
- stride of pooling layerpad
- pad of the pooling layerpoolingConvention
- PoolingConvention (VALID vs FULL)countIncludePad
- Boolean indicating whether to include padding for calculationsLambdaBlock
that applies the avgPool2DBlock
activation functionpublic static Block avgPool2DBlock(Shape kernel, Shape stride, Shape pad, PoolingConvention poolingConvention)
LambdaBlock
that applies the avgPool2DBlock
pooling function in its forward function.kernel
- kernel of pooling layerstride
- stride of pooling layerpad
- pad of the pooling layerpoolingConvention
- PoolingConvention (VALID vs FULL)LambdaBlock
that applies the avgPool2DBlock
activation functionpublic static Block avgPool2DBlock(Shape kernel, Shape stride, Shape pad)
LambdaBlock
that applies the avgPool2DBlock
pooling function in its forward function.kernel
- kernel of pooling layerstride
- stride of pooling layerpad
- pad of the pooling layerLambdaBlock
that applies the avgPool2DBlock
activation functionpublic static Block avgPool2DBlock(Shape kernel, Shape stride)
LambdaBlock
that applies the avgPool2DBlock
pooling function in its forward function.kernel
- kernel of pooling layerstride
- stride of pooling layerLambdaBlock
that applies the avgPool2DBlock
activation functionpublic static Block avgPool2DBlock(Shape kernel)
LambdaBlock
that applies the avgPool2DBlock
pooling function in its forward function.kernel
- kernel of pooling layerLambdaBlock
that applies the avgPool2DBlock
activation functionpublic static Block avgPool3DBlock(Shape kernel, Shape stride, Shape pad, PoolingConvention poolingConvention, boolean countIncludePad)
LambdaBlock
that applies the avgPool3DBlock
pooling function in its forward function.kernel
- kernel of pooling layerstride
- stride of pooling layerpad
- pad of the pooling layerpoolingConvention
- PoolingConvention (VALID vs FULL)countIncludePad
- Boolean indicating whether to include padding for calculationsLambdaBlock
that applies the avgPool3DBlock
activation functionpublic static Block avgPool3DBlock(Shape kernel, Shape stride, Shape pad, PoolingConvention poolingConvention)
LambdaBlock
that applies the avgPool3DBlock
pooling function in its forward function.kernel
- kernel of pooling layerstride
- stride of pooling layerpad
- pad of the pooling layerpoolingConvention
- PoolingConvention (VALID vs FULL)LambdaBlock
that applies the avgPool3DBlock
activation functionpublic static Block avgPool3DBlock(Shape kernel, Shape stride, Shape pad)
LambdaBlock
that applies the avgPool3DBlock
pooling function in its forward function.kernel
- kernel of pooling layerstride
- stride of pooling layerpad
- pad of the pooling layerLambdaBlock
that applies the avgPool3DBlock
activation functionpublic static Block avgPool3DBlock(Shape kernel, Shape stride)
LambdaBlock
that applies the avgPool3DBlock
pooling function in its forward function.kernel
- kernel of pooling layerstride
- stride of pooling layerLambdaBlock
that applies the avgPool3DBlock
activation functionpublic static Block avgPool3DBlock(Shape kernel)
LambdaBlock
that applies the avgPool3DBlock
pooling function in its forward function.kernel
- kernel of pooling layerLambdaBlock
that applies the avgPool3DBlock
activation functionpublic static Block globalAvgPool1DBlock()
LambdaBlock
that applies the globalAvgPool1D
pooling function.LambdaBlock
that applies the globalAvgPool1D
pooling functionpublic static Block globalAvgPool2DBlock()
LambdaBlock
that applies the globalAvgPool2D
pooling function.LambdaBlock
that applies the globalAvgPool2D
pooling functionpublic static Block globalAvgPool3DBlock()
LambdaBlock
that applies the globalAvgPool3D
pooling function.LambdaBlock
that applies the globalAvgPool3D
pooling functionpublic static Block lpPool1DBlock(Shape kernel, Shape stride, Shape pad, PoolingConvention poolingConvention, int pValue)
LambdaBlock
that applies the lpPool1DBlock
pooling function in its forward function.kernel
- kernel of pooling layerstride
- stride of pooling layerpad
- pad of the pooling layerpoolingConvention
- PoolingConvention (VALID vs FULL)pValue
- integer indicating pValueLambdaBlock
that applies the lpPool1DBlock
activation functionpublic static Block lpPool1DBlock(Shape kernel, Shape stride, Shape pad, int pValue)
LambdaBlock
that applies the lpPool1DBlock
pooling function in its forward function.kernel
- kernel of pooling layerstride
- stride of pooling layerpad
- pad of the pooling layerpValue
- integer indicating pValueLambdaBlock
that applies the lpPool1DBlock
activation functionpublic static Block lpPool1DBlock(Shape kernel, Shape stride, int pValue)
LambdaBlock
that applies the lpPool1DBlock
pooling function in its forward function.kernel
- kernel of pooling layerstride
- stride of pooling layerpValue
- integer indicating pValueLambdaBlock
that applies the lpPool1DBlock
activation functionpublic static Block lpPool1DBlock(Shape kernel, int pValue)
LambdaBlock
that applies the lpPool1DBlock
pooling function in its forward function.kernel
- kernel of pooling layerpValue
- integer indicating pValueLambdaBlock
that applies the lpPool1DBlock
activation functionpublic static Block lpPool2DBlock(Shape kernel, Shape stride, Shape pad, PoolingConvention poolingConvention, int pValue)
LambdaBlock
that applies the lpPool2DBlock
pooling function in its forward function.kernel
- kernel of pooling layerstride
- stride of pooling layerpad
- pad of the pooling layerpoolingConvention
- PoolingConvention (VALID vs FULL)pValue
- integer indicating pValueLambdaBlock
that applies the lpPool2DBlock
activation functionpublic static Block lpPool2DBlock(Shape kernel, Shape stride, Shape pad, int pValue)
LambdaBlock
that applies the lpPool2DBlock
pooling function in its forward function.kernel
- kernel of pooling layerstride
- stride of pooling layerpad
- pad of the pooling layerpValue
- integer indicating pValueLambdaBlock
that applies the lpPool2DBlock
activation functionpublic static Block lpPool2DBlock(Shape kernel, Shape stride, int pValue)
LambdaBlock
that applies the lpPool2DBlock
pooling function in its forward function.kernel
- kernel of pooling layerstride
- stride of pooling layerpValue
- integer indicating pValueLambdaBlock
that applies the lpPool2DBlock
activation functionpublic static Block lpPool2DBlock(Shape kernel, int pValue)
LambdaBlock
that applies the lpPool2DBlock
pooling function in its forward function.kernel
- kernel of pooling layerpValue
- integer indicating pValueLambdaBlock
that applies the lpPool2DBlock
activation functionpublic static Block lpPool3DBlock(Shape kernel, Shape stride, Shape pad, PoolingConvention poolingConvention, int pValue)
LambdaBlock
that applies the lpPool3DBlock
pooling function in its forward function.kernel
- kernel of pooling layerstride
- stride of pooling layerpad
- pad of the pooling layerpoolingConvention
- PoolingConvention (VALID vs FULL)pValue
- integer indicating pValueLambdaBlock
that applies the lpPool3DBlock
activation functionpublic static Block lpPool3DBlock(Shape kernel, Shape stride, Shape pad, int pValue)
LambdaBlock
that applies the lpPool3DBlock
pooling function in its forward function.kernel
- kernel of pooling layerstride
- stride of pooling layerpad
- pad of the pooling layerpValue
- integer indicating pValueLambdaBlock
that applies the lpPool3DBlock
activation functionpublic static Block lpPool3DBlock(Shape kernel, Shape stride, int pValue)
LambdaBlock
that applies the LpPoo3D
pooling function in its forward function.kernel
- kernel of pooling layerstride
- stride of pooling layerpValue
- integer indicating pValueLambdaBlock
that applies the lpPool3DBlock
activation functionpublic static Block lpPool3DBlock(Shape kernel, int pValue)
LambdaBlock
that applies the lpPool3DBlock
pooling function in its forward function.kernel
- kernel of pooling layerpValue
- integer indicating pValueLambdaBlock
that applies the lpPool3DBlock
activation functionpublic static Block globalLpPool1DBlock(int pValue)
LambdaBlock
that applies the globalLpPool1D
pooling function.pValue
- integer indicating pValueLambdaBlock
that applies the globalLpPool1D
pooling functionpublic static Block globalLpPool2DBlock(int pValue)
LambdaBlock
that applies the globalLpPool2D
pooling function.pValue
- integer indicating pValueLambdaBlock
that applies the globalLpPool2D
pooling functionpublic static Block globalLpPool3DBlock(int pValue)
LambdaBlock
that applies the globalLpPool3D
pooling function.pValue
- integer indicating pValueLambdaBlock
that applies the globalLpPool3D
pooling function