MPSNNOptimizer(3) | MetalPerformanceShaders.framework | MPSNNOptimizer(3) |
MPSNNOptimizer
#import <MPSNNOptimizers.h>
Inherits MPSKernel.
Inherited by MPSNNOptimizerAdam, MPSNNOptimizerRMSProp, and MPSNNOptimizerStochasticGradientDescent.
(nonnull instancetype) - initWithDevice:
(void) - setLearningRate:
float learningRate
float gradientRescale
BOOL applyGradientClipping
float gradientClipMax
float gradientClipMin
float regularizationScale
MPSNNRegularizationType regularizationType
The MPSNNOptimizer base class, use one of the child classes, not to be directly used. Optimizers are generally used to update trainable neural network parameters. Users are usually expected to call these MPSKernels from the update methods on their Convolution or BatchNormalization data sources.
Before the gradient is used to update the original value, some preprocessing occurs on each gradient where it is scaled or clipped If regularization is chosen the appropriate regularization loss gradient is added to the value gradient.
Standard init with default properties per filter type
Parameters:
Returns:
Reimplemented from MPSKernel.
Reimplemented in MPSNNOptimizerAdam, MPSNNOptimizerRMSProp, and MPSNNOptimizerStochasticGradientDescent.
A bool which decides if gradient will be clipped The default value is NO
The maximum value at which incoming gradient will be clipped before rescaling, applyGradientClipping must be true
The minimum value at which incoming gradient will be clipped before rescaling, applyGradientClipping must be true
The gradientRescale at which we apply to incoming gradient values The default value is 1.0
The learningRate at which we update values The default value is 1e-3
The regularizationScale at which we apply L1 or L2 regularization, it gets ignored if regularization is None The default value is 0.0
The regularizationType which we apply. The default value is MPSRegularizationTypeNone
Generated automatically by Doxygen for MetalPerformanceShaders.framework from the source code.
Mon Jul 9 2018 | Version MetalPerformanceShaders-119.3 |