MPSCNNCrossChannelNormalization(3) | MetalPerformanceShaders.framework | MPSCNNCrossChannelNormalization(3) |
MPSCNNCrossChannelNormalization
#import <MPSCNNNormalization.h>
Inherits MPSCNNKernel.
(nonnull instancetype) - initWithDevice:kernelSize:
(nullable instancetype) - initWithCoder:device:
(nonnull instancetype) - initWithDevice:
float alpha
float beta
float delta
NSUInteger kernelSize
This depends on Metal.framework Specifies the normalization filter across feature channels. This normalization filter applies the filter to a local region across nearby feature channels, but with no spatial extent (i.e., they have shape kernelSize x 1 x 1). The normalized output is given by: Y(i,j,k) = X(i,j,k) / L(i,j,k)^beta, where the normalizing factor is: L(i,j,k) = delta + alpha/N * (sum_{q in Q(k)} X(i,j,q)^2, where N is the kernel size. The window Q(k) itself is defined as: Q(k) = [max(0, k-floor(N/2)), min(D-1, k+floor((N-1)/2)], where
k is the feature channel index (running from 0 to D-1) and D is the number of feature channels, and alpha, beta and delta are paremeters. It is the end-users responsibility to ensure that the combination of the parameters delta and alpha does not result in a situation where the denominator becomes zero - in such situations the resulting pixel-value is undefined.
NSSecureCoding compatability While the standard NSSecureCoding/NSCoding method -initWithCoder: should work, since the file can't know which device your data is allocated on, we have to guess and may guess incorrectly. To avoid that problem, use initWithCoder:device instead.
Parameters:
Returns:
Reimplemented from MPSCNNKernel.
Standard init with default properties per filter type
Parameters:
Returns:
Reimplemented from MPSCNNKernel.
Initialize a local response normalization filter in a channel
Parameters:
Returns:
The value of alpha. Default is 1.0. Must be non-negative.
The value of beta. Default is 5.0
The value of delta. Default is 1.0
The size of the square filter window. Default is 5
Generated automatically by Doxygen for MetalPerformanceShaders.framework from the source code.
Mon Jul 9 2018 | Version MetalPerformanceShaders-119.3 |