MPSCNNPoolingL2NormGradient(3) | MetalPerformanceShaders.framework | MPSCNNPoolingL2NormGradient(3) |
MPSCNNPoolingL2NormGradient
#import <MPSCNNPooling.h>
Inherits MPSCNNPoolingGradient.
(nonnull instancetype) -
initWithDevice:kernelWidth:kernelHeight:strideInPixelsX:strideInPixelsY:
(nullable instancetype) - initWithCoder:device:
This depends on Metal.framework Specifies the filter for computing the gradient of the L2-Norm pooling filter. The operation backpropagates a gradient vector using chain rule.
L2-Norm pooling forward pass is defined as:
out(x) = sqrt( sum_{dx in Window(x)} in(s*x+dx) * in(s*x+dx) ), where
the pooling window definition 'Window(x)' follows MPSCNNPooling specification and 's' is the pixel stride and in() is the source input image.
Hence the partial derivative of the output value wrt. to the input value needed in the gradient backpropagation in MPSCNNPoolingGradient is:
d out(x)/d in(y) = sum_{dx in Window(x)} delta_{s*x+dx, y} in(s*x+dx) / out(x), where
delta_{x,y} is the Kronecker delta symbol for which
delta_{x,y} = { 1, when x == y
{ 0, otherwise,
and out(x) is the L2-norm pooling value at point 'x' defined above.
NSSecureCoding compatability See MPSKernel::initWithCoder.
Parameters:
Returns:
Reimplemented from MPSCNNPoolingGradient.
Initialize a gradient L2-norm pooling filter
Parameters:
Returns:
Reimplemented from MPSCNNPoolingGradient.
Generated automatically by Doxygen for MetalPerformanceShaders.framework from the source code.
Mon Jul 9 2018 | Version MetalPerformanceShaders-119.3 |