MPSCNNPoolingAverage(3) 				 MetalPerformanceShaders.framework				   MPSCNNPoolingAverage(3)

NAME
MPSCNNPoolingAverage SYNOPSIS
#import <MPSCNNPooling.h> Inherits MPSCNNPooling. Instance Methods (nonnull instancetype) - initWithDevice:kernelWidth:kernelHeight:strideInPixelsX:strideInPixelsY: (nullable instancetype) - initWithCoder:device: Properties NSUInteger zeroPadSizeX NSUInteger zeroPadSizeY Additional Inherited Members Detailed Description This depends on Metal.framework Specifies the average pooling filter. For each pixel, returns the mean value of pixels in the kernelWidth x kernelHeight filter region. When edgeMode is MPSImageEdgeModeClamp the filtering window is shrunk to remain within the source image borders. What this means is that close to image borders the filtering window will be smaller in order to fit inside the source image and less values will be used to compute the average. In case the filtering window is entirely outside the source image border the outputted value will be zero. Method Documentation - (nullable instancetype) initWithCoder: (NSCoder *__nonnull) aDecoder(nonnull id< MTLDevice >) device NSSecureCoding compatability See MPSKernel::initWithCoder. Parameters: aDecoder The NSCoder subclass with your serialized MPSCNNPooling device The MTLDevice on which to make the MPSCNNPooling Returns: A new MPSCNNPooling object, or nil if failure. Reimplemented from MPSCNNPooling. - (nonnull instancetype) initWithDevice: (nonnull id< MTLDevice >) device(NSUInteger) kernelWidth(NSUInteger) kernelHeight(NSUInteger) strideInPixelsX(NSUInteger) strideInPixelsY Initialize a MPSCNNPoolingAverage pooling filter Parameters: device The device the filter will run on kernelWidth The width of the kernel. Can be an odd or even value. kernelHeight The height of the kernel. Can be an odd or even value. strideInPixelsX The output stride (downsampling factor) in the x dimension. strideInPixelsY The output stride (downsampling factor) in the y dimension. Returns: A valid MPSCNNPooling object or nil, if failure. Reimplemented from MPSCNNPooling. Property Documentation - zeroPadSizeX [read], [write], [nonatomic], [assign] How much zero padding to apply to both left and right borders of the input image for average pooling, when using See also: edgeMode MPSImageEdgeModeClamp. For edgeMode MPSImageEdgeModeZero this property is ignored and the area outside the image is interpreted to contain zeros. The zero padding size is used to shrink the pooling window to fit inside the area bound by the source image and its padding region, but the effect is that the normalization factor of the average computation is computed also for the zeros in the padding region. - zeroPadSizeY [read], [write], [nonatomic], [assign] How much zero padding to apply to both top and bottom borders of the input image for average pooling, when using See also: edgeMode MPSImageEdgeModeClamp. For edgeMode MPSImageEdgeModeZero this property is ignored and the area outside the image is interpreted to contain zeros. The zero padding size is used to shrink the pooling window to fit inside the area bound by the source image and its padding region, but the effect is that the normalization factor of the average computation is computed also for the zeros in the padding region. Author Generated automatically by Doxygen for MetalPerformanceShaders.framework from the source code. Version MetalPerformanceShaders-100 Thu Feb 8 2018 MPSCNNPoolingAverage(3)