MPSNNOptimizerDescriptor(3)

NAME
MPSNNOptimizerDescriptor

SYNOPSIS

#import <MPSNNOptimizers.h>

Inherits NSObject.

  Instance Methods
(nonnull instancetype) - initWithLearningRate:gradientRescale:regularizationType:regularizationScale:
(nonnull instancetype) - initWithLearningRate:gradientRescale:applyGradientClipping:gradientClipMax:gradientClipMin:regularizationType:regularizationScale:

  Class Methods
(nonnull instancetype) + optimizerDescriptorWithLearningRate:gradientRescale:regularizationType:regularizationScale:
(nonnull instancetype) + optimizerDescriptorWithLearningRate:gradientRescale:applyGradientClipping:gradientClipMax:gradientClipMin:regularizationType:regularizationScale:

  Properties
float learningRate
float gradientRescale
BOOL applyGradientClipping
float gradientClipMax
float gradientClipMin
float regularizationScale
MPSNNRegularizationType regularizationType

Detailed Description

The MPSNNOptimizerDescriptor base class. 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.

Method Documentation

  - (nonnull instancetype) initWithLearningRate: (float) learningRate(float) gradientRescale(BOOL) applyGradientClipping(float) gradientClipMax(float) gradientClipMin(MPSNNRegularizationType) regularizationType(float) regularizationScale

  - (nonnull instancetype) initWithLearningRate: (float) learningRate(float) gradientRescale(MPSNNRegularizationType) regularizationType(float) regularizationScale

  + (nonnull instancetype) optimizerDescriptorWithLearningRate: (float) learningRate(float) gradientRescale(BOOL) applyGradientClipping(float) gradientClipMax(float) gradientClipMin(MPSNNRegularizationType) regularizationType(float) regularizationScale

  + (nonnull instancetype) optimizerDescriptorWithLearningRate: (float) learningRate(float) gradientRescale(MPSNNRegularizationType) regularizationType(float) regularizationScale

Property Documentation

  - applyGradientClipping [read], [write], [nonatomic], [assign]
A bool which decides if gradient will be clipped The default value is NO

  - gradientClipMax [read], [write], [nonatomic], [assign]
The maximum value at which incoming gradient will be clipped before rescaling, applyGradientClipping must be true

  - gradientClipMin [read], [write], [nonatomic], [assign]
The minimum value at which incoming gradient will be clipped before rescaling, applyGradientClipping must be true

  - gradientRescale [read], [write], [nonatomic], [assign]
The gradientRescale at which we apply to incoming gradient values The default value is 1.0

  - learningRate [read], [write], [nonatomic], [assign]
The learningRate at which we update values The default value is 0.001f

  - regularizationScale [read], [write], [nonatomic], [assign]
The regularizationScale at which we apply L1 or L2 regularization, it gets ignored if regularization is None The default value is 0.0

  - regularizationType [read], [write], [nonatomic], [assign]
The regularizationType which we apply. The default value is MPSRegularizationTypeNone

Author

Generated automatically by Doxygen for MetalPerformanceShaders.framework from the source code.