ภาษา

ArmMachineLearningModelFactory.ImageModelSettingsClassification Method

Definition

Settings used for training the model. For more information on the available settings please visit the official documentation: https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models.

public static Azure.ResourceManager.MachineLearning.Models.ImageModelSettingsClassification ImageModelSettingsClassification(string advancedSettings = default, bool? amsGradient = default, string augmentations = default, float? beta1 = default, float? beta2 = default, int? checkpointFrequency = default, Azure.ResourceManager.MachineLearning.Models.MachineLearningFlowModelJobInput checkpointModel = default, string checkpointRunId = default, bool? distributed = default, bool? earlyStopping = default, int? earlyStoppingDelay = default, int? earlyStoppingPatience = default, bool? enableOnnxNormalization = default, int? evaluationFrequency = default, int? gradientAccumulationStep = default, int? layersToFreeze = default, float? learningRate = default, Azure.ResourceManager.MachineLearning.Models.LearningRateScheduler? learningRateScheduler = default, string modelName = default, float? momentum = default, bool? nesterov = default, int? numberOfEpochs = default, int? numberOfWorkers = default, Azure.ResourceManager.MachineLearning.Models.StochasticOptimizer? optimizer = default, int? randomSeed = default, float? stepLRGamma = default, int? stepLRStepSize = default, int? trainingBatchSize = default, int? validationBatchSize = default, float? warmupCosineLRCycles = default, int? warmupCosineLRWarmupEpochs = default, float? weightDecay = default, int? trainingCropSize = default, int? validationCropSize = default, int? validationResizeSize = default, int? weightedLoss = default);
static member ImageModelSettingsClassification : string * Nullable<bool> * string * Nullable<single> * Nullable<single> * Nullable<int> * Azure.ResourceManager.MachineLearning.Models.MachineLearningFlowModelJobInput * string * Nullable<bool> * Nullable<bool> * Nullable<int> * Nullable<int> * Nullable<bool> * Nullable<int> * Nullable<int> * Nullable<int> * Nullable<single> * Nullable<Azure.ResourceManager.MachineLearning.Models.LearningRateScheduler> * string * Nullable<single> * Nullable<bool> * Nullable<int> * Nullable<int> * Nullable<Azure.ResourceManager.MachineLearning.Models.StochasticOptimizer> * Nullable<int> * Nullable<single> * Nullable<int> * Nullable<int> * Nullable<int> * Nullable<single> * Nullable<int> * Nullable<single> * Nullable<int> * Nullable<int> * Nullable<int> * Nullable<int> -> Azure.ResourceManager.MachineLearning.Models.ImageModelSettingsClassification
Public Shared Function ImageModelSettingsClassification (Optional advancedSettings As String = Nothing, Optional amsGradient As Nullable(Of Boolean) = Nothing, Optional augmentations As String = Nothing, Optional beta1 As Nullable(Of Single) = Nothing, Optional beta2 As Nullable(Of Single) = Nothing, Optional checkpointFrequency As Nullable(Of Integer) = Nothing, Optional checkpointModel As MachineLearningFlowModelJobInput = Nothing, Optional checkpointRunId As String = Nothing, Optional distributed As Nullable(Of Boolean) = Nothing, Optional earlyStopping As Nullable(Of Boolean) = Nothing, Optional earlyStoppingDelay As Nullable(Of Integer) = Nothing, Optional earlyStoppingPatience As Nullable(Of Integer) = Nothing, Optional enableOnnxNormalization As Nullable(Of Boolean) = Nothing, Optional evaluationFrequency As Nullable(Of Integer) = Nothing, Optional gradientAccumulationStep As Nullable(Of Integer) = Nothing, Optional layersToFreeze As Nullable(Of Integer) = Nothing, Optional learningRate As Nullable(Of Single) = Nothing, Optional learningRateScheduler As Nullable(Of LearningRateScheduler) = Nothing, Optional modelName As String = Nothing, Optional momentum As Nullable(Of Single) = Nothing, Optional nesterov As Nullable(Of Boolean) = Nothing, Optional numberOfEpochs As Nullable(Of Integer) = Nothing, Optional numberOfWorkers As Nullable(Of Integer) = Nothing, Optional optimizer As Nullable(Of StochasticOptimizer) = Nothing, Optional randomSeed As Nullable(Of Integer) = Nothing, Optional stepLRGamma As Nullable(Of Single) = Nothing, Optional stepLRStepSize As Nullable(Of Integer) = Nothing, Optional trainingBatchSize As Nullable(Of Integer) = Nothing, Optional validationBatchSize As Nullable(Of Integer) = Nothing, Optional warmupCosineLRCycles As Nullable(Of Single) = Nothing, Optional warmupCosineLRWarmupEpochs As Nullable(Of Integer) = Nothing, Optional weightDecay As Nullable(Of Single) = Nothing, Optional trainingCropSize As Nullable(Of Integer) = Nothing, Optional validationCropSize As Nullable(Of Integer) = Nothing, Optional validationResizeSize As Nullable(Of Integer) = Nothing, Optional weightedLoss As Nullable(Of Integer) = Nothing) As ImageModelSettingsClassification

Parameters

advancedSettings
String

Settings for advanced scenarios.

amsGradient
Nullable<Boolean>

Enable AMSGrad when optimizer is 'adam' or 'adamw'.

augmentations
String

Settings for using Augmentations.

beta1
Nullable<Single>

Value of 'beta1' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, 1].

beta2
Nullable<Single>

Value of 'beta2' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, 1].

checkpointFrequency
Nullable<Int32>

Frequency to store model checkpoints. Must be a positive integer.

checkpointModel
MachineLearningFlowModelJobInput

The pretrained checkpoint model for incremental training.

checkpointRunId
String

The id of a previous run that has a pretrained checkpoint for incremental training.

distributed
Nullable<Boolean>

Whether to use distributed training.

earlyStopping
Nullable<Boolean>

Enable early stopping logic during training.

earlyStoppingDelay
Nullable<Int32>

Minimum number of epochs or validation evaluations to wait before primary metric improvement is tracked for early stopping. Must be a positive integer.

earlyStoppingPatience
Nullable<Int32>

Minimum number of epochs or validation evaluations with no primary metric improvement before the run is stopped. Must be a positive integer.

enableOnnxNormalization
Nullable<Boolean>

Enable normalization when exporting ONNX model.

evaluationFrequency
Nullable<Int32>

Frequency to evaluate validation dataset to get metric scores. Must be a positive integer.

gradientAccumulationStep
Nullable<Int32>

Gradient accumulation means running a configured number of "GradAccumulationStep" steps without updating the model weights while accumulating the gradients of those steps, and then using the accumulated gradients to compute the weight updates. Must be a positive integer.

layersToFreeze
Nullable<Int32>

Number of layers to freeze for the model. Must be a positive integer. For instance, passing 2 as value for 'seresnext' means freezing layer0 and layer1. For a full list of models supported and details on layer freeze, please see: https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models.

learningRate
Nullable<Single>

Initial learning rate. Must be a float in the range [0, 1].

learningRateScheduler
Nullable<LearningRateScheduler>

Learning rate scheduler enum.

modelName
String

Name of the model to use for training. For more information on the available models please visit the official documentation: https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models.

momentum
Nullable<Single>

Value of momentum when optimizer is 'sgd'. Must be a float in the range [0, 1].

nesterov
Nullable<Boolean>

Enable nesterov when optimizer is 'sgd'.

numberOfEpochs
Nullable<Int32>

Number of training epochs. Must be a positive integer.

numberOfWorkers
Nullable<Int32>

Number of data loader workers. Must be a non-negative integer.

optimizer
Nullable<StochasticOptimizer>

Stochastic optimizer for image models.

randomSeed
Nullable<Int32>

Random seed to be used when using deterministic training.

stepLRGamma
Nullable<Single>

Value of gamma when learning rate scheduler is 'step'. Must be a float in the range [0, 1].

stepLRStepSize
Nullable<Int32>

Value of step size when learning rate scheduler is 'step'. Must be a positive integer.

trainingBatchSize
Nullable<Int32>

Training batch size. Must be a positive integer.

validationBatchSize
Nullable<Int32>

Validation batch size. Must be a positive integer.

warmupCosineLRCycles
Nullable<Single>

Value of cosine cycle when learning rate scheduler is 'warmup_cosine'. Must be a float in the range [0, 1].

warmupCosineLRWarmupEpochs
Nullable<Int32>

Value of warmup epochs when learning rate scheduler is 'warmup_cosine'. Must be a positive integer.

weightDecay
Nullable<Single>

Value of weight decay when optimizer is 'sgd', 'adam', or 'adamw'. Must be a float in the range[0, 1].

trainingCropSize
Nullable<Int32>

Image crop size that is input to the neural network for the training dataset. Must be a positive integer.

validationCropSize
Nullable<Int32>

Image crop size that is input to the neural network for the validation dataset. Must be a positive integer.

validationResizeSize
Nullable<Int32>

Image size to which to resize before cropping for validation dataset. Must be a positive integer.

weightedLoss
Nullable<Int32>

Weighted loss. The accepted values are 0 for no weighted loss. 1 for weighted loss with sqrt.(class_weights). 2 for weighted loss with class_weights. Must be 0 or 1 or 2.

Returns

A new ImageModelSettingsClassification instance for mocking.

Applies to