Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

mpscnncrosschannelnormalizationgradient(3) [mojave man page]

MPSCNNCrossChannelNormalizationGradient(3)		 MetalPerformanceShaders.framework		MPSCNNCrossChannelNormalizationGradient(3)

NAME
MPSCNNCrossChannelNormalizationGradient SYNOPSIS
#import <MPSCNNNormalization.h> Inherits MPSCNNGradientKernel. Instance Methods (nonnull instancetype) - initWithDevice:kernelSize: (nullable instancetype) - initWithCoder:device: Properties float alpha float beta float delta NSUInteger kernelSize Additional Inherited Members Detailed Description This depends on Metal.framework Specifies the normalization gradient 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. OutputGradient: dZ/dX(i,j,k) = dZ/dY(i,j,k) * (L(i,j,k)^-beta) - 2 * alpha * beta * X(i,j,k) * ( sum_{r in R(k)} dZ/dY(i,j,r) * X(i,j,r) * (L(i,j,r) ^ (-beta-1)) ) N is the kernel size. The window L(i) and K(j) itself is defined as: R(k) = [max(0, k-floor((N-1)/2)), min(D-1, k+floor(N/2)] For correct gradient computation all parameters must be the same as the original normalization filter. Method Documentation - (nullable instancetype) initWithCoder: (NSCoder *__nonnull) aDecoder(nonnull id< MTLDevice >) device 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: aDecoder The NSCoder subclass with your serialized MPSKernel device The MTLDevice on which to make the MPSKernel Returns: A new MPSKernel object, or nil if failure. Reimplemented from MPSCNNGradientKernel. - (nonnull instancetype) initWithDevice: (nonnull id< MTLDevice >) device(NSUInteger) kernelSize Initialize a cross channel normalization gradient filter Parameters: device The device the filter will run on kernelSize The kernel filter size in each dimension. Returns: A valid MPSCNNCrossChannelNormalization object or nil, if failure. Property Documentation - alpha [read], [write], [nonatomic], [assign] The value of alpha. Default is 1.0. Must be non-negative. - beta [read], [write], [nonatomic], [assign] The value of beta. Default is 5.0 - delta [read], [write], [nonatomic], [assign] The value of delta. Default is 1.0 - kernelSize [read], [nonatomic], [assign] The size of the square filter window. Default is 5 Author Generated automatically by Doxygen for MetalPerformanceShaders.framework from the source code. Version MetalPerformanceShaders-100 Thu Feb 8 2018 MPSCNNCrossChannelNormalizationGradient(3)

Check Out this Related Man Page

MPSCNNNeuronGradient(3) 				 MetalPerformanceShaders.framework				   MPSCNNNeuronGradient(3)

NAME
MPSCNNNeuronGradient SYNOPSIS
#import <MPSCNNNeuron.h> Inherits MPSCNNGradientKernel. Instance Methods (nonnull instancetype) - initWithDevice: (nonnull instancetype) - initWithDevice:neuronDescriptor: (nullable instancetype) - initWithCoder:device: Properties MPSCNNNeuronType neuronType float a float b float c NSData * data Additional Inherited Members Detailed Description This depends on Metal.framework This filter is a backward filter for the neuron activation function filter. The following filter types are supported: MPSCNNNeuronTypeNone ///< df/dx = 1 MPSCNNNeuronTypeLinear ///< df/dx = a MPSCNNNeuronTypeReLU ///< df/dx = [ 1, if x >= 0 [ a, if x < 0 MPSCNNNeuronTypeSigmoid ///< df/dx = e^x / (e^x + 1)^2 MPSCNNNeuronTypeHardSigmoid ///< df/dx = [ a, if (x >= 0) and (x <= 1) [ 0, otherwise MPSCNNNeuronTypeTanH ///< df/dx = a * b * (1 - tanh^2(b * x)) MPSCNNNeuronTypeAbsolute ///< df/dx = sign(x) MPSCNNNeuronTypeSoftPlus ///< df/dx = (a * b * exp(b * x)) / (exp(b * x) + 1) MPSCNNNeuronTypeSoftSign ///< df/dx = 1 / (|x| + 1)^2 MPSCNNNeuronTypeELU ///< df/dx = [ a * exp(x), x < 0 [ 1, x >= 0 MPSCNNNeuronTypePReLU ///< df/dx = [ 1, if x >= 0 [ aV, if x < 0 MPSCNNNeuronTypeReLUN ///< df/dx = [ 1, if x >= 0 [ a, if x < 0 [ b, if x >= b MPSCNNNeuronTypePower ///< df/dx = a * c * (a * x + b)^(c - 1) MPSCNNNeuronTypeExponential ///< df/dx = [ a * exp(a * x + b), if c == -1 [ a * log(c) * c^(a * x + b), if c != -1 MPSCNNNeuronTypeLogarithm ///< df/dx = [ a / (a * in + b), if c == -1 [ a / (log(c) * (a * in + b)), if c != -1 The result of the above operation is multiplied with the gradient, computed by the preceeding filter (going backwards). Method Documentation - (nullable instancetype) initWithCoder: (NSCoder *__nonnull) aDecoder(nonnull id< MTLDevice >) device 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: aDecoder The NSCoder subclass with your serialized MPSKernel device The MTLDevice on which to make the MPSKernel Returns: A new MPSKernel object, or nil if failure. Reimplemented from MPSCNNGradientKernel. - (nonnull instancetype) initWithDevice: (nonnull id< MTLDevice >) device Standard init with default properties per filter type Parameters: device The device that the filter will be used on. May not be NULL. Returns: A pointer to the newly initialized object. This will fail, returning nil if the device is not supported. Devices must be MTLFeatureSet_iOS_GPUFamily2_v1 or later. Reimplemented from MPSCNNGradientKernel. - (nonnull instancetype) initWithDevice: (nonnull id< MTLDevice >) device(MPSNNNeuronDescriptor *_Nonnull) neuronDescriptor Initialize the neuron gradient filter with a neuron descriptor. Parameters: device The device the filter will run on. neuronDescriptor The neuron descriptor. For the neuron of type MPSCNNNeuronTypePReLU, the neuron descriptor references an NSData object containing a float array with the per feature channel value of PReLu parameter and, in this case, the MPSCNNNeuronGradient retains the NSData object. Returns: A valid MPSCNNNeuronGradient object or nil, if failure. Property Documentation - (float) a [read], [nonatomic], [assign] - (float) b [read], [nonatomic], [assign] - (float) c [read], [nonatomic], [assign] - (NSData*) data [read], [nonatomic], [retain] - (MPSCNNNeuronType) neuronType [read], [nonatomic], [assign] Author Generated automatically by Doxygen for MetalPerformanceShaders.framework from the source code. Version MetalPerformanceShaders-100 Thu Feb 8 2018 MPSCNNNeuronGradient(3)
Man Page