.TH "MPSCNNPoolingL2NormGradient" 3 "Mon Jul 9 2018" "Version MetalPerformanceShaders-119.3" "MetalPerformanceShaders.framework" \" -*- nroff -*- .ad l .nh .SH NAME MPSCNNPoolingL2NormGradient .SH SYNOPSIS .br .PP .PP \fC#import \fP .PP Inherits \fBMPSCNNPoolingGradient\fP\&. .SS "Instance Methods" .in +1c .ti -1c .RI "(nonnull instancetype) \- \fBinitWithDevice:kernelWidth:kernelHeight:strideInPixelsX:strideInPixelsY:\fP" .br .ti -1c .RI "(nullable instancetype) \- \fBinitWithCoder:device:\fP" .br .in -1c .SS "Additional Inherited Members" .SH "Detailed Description" .PP 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\&. .PP L2-Norm pooling forward pass is defined as: .PP .nf out(x) = sqrt( sum_{dx \in Window(x)} in(s*x+dx) * in(s*x+dx) ), where .fi .PP .PP the pooling window definition 'Window(x)' follows \fBMPSCNNPooling\fP specification and 's' is the pixel stride and in() is the source input image\&. .PP Hence the partial derivative of the output value wrt\&. to the input value needed in the gradient backpropagation in \fBMPSCNNPoolingGradient\fP is: .PP .nf d out(x)/d in(y) = sum_{dx \in Window(x)} delta_{s*x+dx, y} in(s*x+dx) / out(x), where .fi .PP .PP delta_{x,y} is the Kronecker delta symbol for which .PP .nf delta_{x,y} = { 1, when x == y { 0, otherwise, .fi .PP and out(x) is the L2-norm pooling value at point 'x' defined above\&. .SH "Method Documentation" .PP .SS "\- (nullable instancetype) \fBinitWithCoder:\fP (NSCoder *__nonnull) aDecoder(nonnull id< MTLDevice >) device" \fBNSSecureCoding\fP compatability See \fBMPSKernel::initWithCoder\fP\&. .PP \fBParameters:\fP .RS 4 \fIaDecoder\fP The NSCoder subclass with your serialized \fBMPSCNNPoolingL2NormGradient\fP .br \fIdevice\fP The MTLDevice on which to make the \fBMPSCNNPoolingL2NormGradient\fP .RE .PP \fBReturns:\fP .RS 4 \fBA\fP new \fBMPSCNNPoolingL2NormGradient\fP object, or nil if failure\&. .RE .PP .PP Reimplemented from \fBMPSCNNPoolingGradient\fP\&. .SS "\- (nonnull instancetype) \fBinitWithDevice:\fP (nonnull id< MTLDevice >) device(NSUInteger) kernelWidth(NSUInteger) kernelHeight(NSUInteger) strideInPixelsX(NSUInteger) strideInPixelsY" Initialize a gradient L2-norm pooling filter .PP \fBParameters:\fP .RS 4 \fIdevice\fP The device the filter will run on .br \fIkernelWidth\fP The width of the kernel\&. Can be an odd or even value\&. .br \fIkernelHeight\fP The height of the kernel\&. Can be an odd or even value\&. .br \fIstrideInPixelsX\fP The input stride (upsampling factor) in the x dimension\&. .br \fIstrideInPixelsY\fP The input stride (upsampling factor) in the y dimension\&. .RE .PP \fBReturns:\fP .RS 4 \fBA\fP valid \fBMPSCNNPoolingL2NormGradient\fP object or nil, if failure\&. .RE .PP .PP Reimplemented from \fBMPSCNNPoolingGradient\fP\&. .SH "Author" .PP Generated automatically by Doxygen for MetalPerformanceShaders\&.framework from the source code\&.