MPSMatrixBatchNormalizationGradient(3) | MetalPerformanceShaders.framework | MPSMatrixBatchNormalizationGradient(3) |
MPSMatrixBatchNormalizationGradient
#import <MPSMatrixBatchNormalization.h>
Inherits MPSMatrixBinaryKernel.
(void) - setNeuronType:parameterA:parameterB:parameterC:
(MPSCNNNeuronType) - neuronType
(float) - neuronParameterA
(float) - neuronParameterB
(float) - neuronParameterC
(nonnull instancetype) - initWithDevice:
(void) -
encodeToCommandBuffer:gradientMatrix:inputMatrix:meanVector:varianceVector:gammaVector:betaVector:resultGradientForDataMatrix:resultGradientForGammaVector:resultGradientForBetaVector:
(nullable instancetype) - initWithCoder:device:
(nonnull instancetype) - copyWithZone:device:
NSUInteger sourceNumberOfFeatureVectors
NSUInteger sourceInputFeatureChannels
float epsilon
This depends on Metal.framework.
A kernel to compute the gradient of the batch normalization operation.
A MPSMatrixBatchNormalizationGradient object computes the results of backpropagating the gradients of a loss function with respect to the outputs of an MPSMatrixBatchNormalization object. The corresponding properties and data used by the MPSMatrixBatchNormalizationGradient object should correspond to those used by the forward MPSMatrixBatchNormalization object for which the gradient is being computed.
Make a copy of this kernel for a new device -
See also:
Parameters:
Returns:
Reimplemented from MPSKernel.
Encode a MPSMatrixBatchNormalizationGradient object to a command buffer and compute its gradient with respect to its input data.
Parameters:
NSSecureCoding compatability See MPSKernel::initWithCoder.
Parameters:
Returns:
Reimplemented from MPSKernel.
Standard init with default properties per filter type
Parameters:
Returns:
Reimplemented from MPSKernel.
Getter funtion for neuronType set using setNeuronType:parameterA:parameterB:parameterC method
Getter funtion for neuronType set using setNeuronType:parameterA:parameterB:parameterC method
Getter funtion for neuronType set using setNeuronType:parameterA:parameterB:parameterC method
Getter funtion for neuronType set using setNeuronType:parameterA:parameterB:parameterC method
Specifies a neuron activation function to be used.
This method can be used to add a neuron activation funtion of given type with associated scalar parameters A, B, and C that are shared across all output values. Note that this method can only be used to specify neurons which are specified by three (or fewer) parameters shared across all output values (or channels, in CNN nomenclature). It is an error to call this method for neuron activation functions like MPSCNNNeuronTypePReLU, which require per-channel parameter values. An MPSMatrixBatchNormalizationGradient kernel is initialized with a default neuron function of MPSCNNNeuronTypeNone.
Parameters:
A small term added to the variance when normalizing the input.
The number of feature channels in the input vectors.
The number of input vectors which make up the input array.
Generated automatically by Doxygen for MetalPerformanceShaders.framework from the source code.
Mon Jul 9 2018 | Version MetalPerformanceShaders-119.3 |