MPSMatrixFullyConnectedGradient(3) | MetalPerformanceShaders.framework | MPSMatrixFullyConnectedGradient(3) |
MPSMatrixFullyConnectedGradient
#import <MPSMatrixFullyConnected.h>
Inherits MPSMatrixBinaryKernel.
(nonnull instancetype) - initWithDevice:
(void) -
encodeGradientForDataToCommandBuffer:gradientMatrix:weightMatrix:resultGradientForDataMatrix:
(void) -
encodeGradientForWeightsAndBiasToCommandBuffer:gradientMatrix:inputMatrix:resultGradientForWeightMatrix:resultGradientForBiasVector:
(nullable instancetype) - initWithCoder:device:
(nonnull instancetype) - copyWithZone:device:
NSUInteger sourceNumberOfFeatureVectors
NSUInteger sourceOutputFeatureChannels
NSUInteger sourceInputFeatureChannels
double alpha
This depends on Metal.framework.
Computes the gradient of the fully connected layer with respect to either the weights and bias terms or the input feature vectors.
An MPSMatrixFullyConnectedGradient kernel may be used to compute the gradients corresponding to a MPSMatrixFullyConnected kernel. The properties, input, and weight data must match those values used in the forward computation. This kernel does not compute the gradient of any non-identity activation function which may have been applied in the forward kernel. Such a kernel must be expressed using both MPSMatrixFullyConnected and MPSMatrixNeuron if a gradient is to be computed.
Make a copy of this kernel for a new device -
See also:
Parameters:
Returns:
Reimplemented from MPSKernel.
Encode a MPSMatrixFullyConnectedGradient object to a command buffer and produce the gradient of the loss function with respect to the input data.
Parameters:
This operation computes the resulting gradient of the loss function with respect to the forward kernel's input data. weightMatrix should contain the same values used to compute the result of the forward kernel.
Encode a MPSMatrixFullyConnectedGradient object to a command buffer and produce the gradient of the loss function with respect to the weight matrix and bias vector.
Parameters:
This operation computes the resulting gradient of the loss function with respect to the forward kernel's weight data. inputMatrix should contain the same values used to compute the result of the forward kernel.
NSSecureCoding compatability See MPSKernel::initWithCoder.
Parameters:
Returns:
Reimplemented from MPSKernel.
Standard init with default properties per filter type
Parameters:
Returns:
Reimplemented from MPSKernel.
Scale factor to apply to the product. This value should be equal to the corresponding value in the forward fully connected kernel.
The number of feature channels in the input to the forward fully connected layer. This is equivalent to the number of columns in the input matrix.
This value should be equal to the corresponding value in the forward fully connected kernel.
The number of input vectors which make up the input array. This is equivalent to the number of rows in both the input matrix and the source gradient matrix.
This value should be equal to the corresponding value in the forward fully connected kernel.
The number of feature channels in the output of the forward fully connected layer. This is equivalent to the number of columns in both the weight matrix and the source gradient matrix.
This value should be equal to the corresponding value in the forward fully connected kernel.
Generated automatically by Doxygen for MetalPerformanceShaders.framework from the source code.
Mon Jul 9 2018 | Version MetalPerformanceShaders-119.3 |