Class ImageModelDistributionSettingsObjectDetection
- java.lang.Object
-
- com.azure.resourcemanager.machinelearning.models.ImageModelDistributionSettings
-
- com.azure.resourcemanager.machinelearning.models.ImageModelDistributionSettingsObjectDetection
-
public final class ImageModelDistributionSettingsObjectDetection extends ImageModelDistributionSettings
Distribution expressions to sweep over values of model settings. <example> Some examples are: <code> ModelName = "choice('seresnext', 'resnest50')"; LearningRate = "uniform(0.001, 0.01)"; LayersToFreeze = "choice(0, 2)"; </code></example> For more details on how to compose distribution expressions please check the documentation: https://docs.microsoft.com/en-us/azure/machine-learning/how-to-tune-hyperparameters 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.
-
-
Constructor Summary
Constructors Constructor Description ImageModelDistributionSettingsObjectDetection()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
boxDetectionsPerImage()
Get the boxDetectionsPerImage property: Maximum number of detections per image, for all classes.String
boxScoreThreshold()
Get the boxScoreThreshold property: During inference, only return proposals with a classification score greater than BoxScoreThreshold.String
imageSize()
Get the imageSize property: Image size for train and validation.String
maxSize()
Get the maxSize property: Maximum size of the image to be rescaled before feeding it to the backbone.String
minSize()
Get the minSize property: Minimum size of the image to be rescaled before feeding it to the backbone.String
modelSize()
Get the modelSize property: Model size.String
multiScale()
Get the multiScale property: Enable multi-scale image by varying image size by +/- 50%.String
nmsIouThreshold()
Get the nmsIouThreshold property: IOU threshold used during inference in NMS post processing.String
tileGridSize()
Get the tileGridSize property: The grid size to use for tiling each image.String
tileOverlapRatio()
Get the tileOverlapRatio property: Overlap ratio between adjacent tiles in each dimension.String
tilePredictionsNmsThreshold()
Get the tilePredictionsNmsThreshold property: The IOU threshold to use to perform NMS while merging predictions from tiles and image.void
validate()
Validates the instance.String
validationIouThreshold()
Get the validationIouThreshold property: IOU threshold to use when computing validation metric.String
validationMetricType()
Get the validationMetricType property: Metric computation method to use for validation metrics.ImageModelDistributionSettingsObjectDetection
withAmsGradient(String amsGradient)
Set the amsGradient property: Enable AMSGrad when optimizer is 'adam' or 'adamw'.ImageModelDistributionSettingsObjectDetection
withAugmentations(String augmentations)
Set the augmentations property: Settings for using Augmentations.ImageModelDistributionSettingsObjectDetection
withBeta1(String beta1)
Set the beta1 property: Value of 'beta1' when optimizer is 'adam' or 'adamw'.ImageModelDistributionSettingsObjectDetection
withBeta2(String beta2)
Set the beta2 property: Value of 'beta2' when optimizer is 'adam' or 'adamw'.ImageModelDistributionSettingsObjectDetection
withBoxDetectionsPerImage(String boxDetectionsPerImage)
Set the boxDetectionsPerImage property: Maximum number of detections per image, for all classes.ImageModelDistributionSettingsObjectDetection
withBoxScoreThreshold(String boxScoreThreshold)
Set the boxScoreThreshold property: During inference, only return proposals with a classification score greater than BoxScoreThreshold.ImageModelDistributionSettingsObjectDetection
withDistributed(String distributed)
Set the distributed property: Whether to use distributer training.ImageModelDistributionSettingsObjectDetection
withEarlyStopping(String earlyStopping)
Set the earlyStopping property: Enable early stopping logic during training.ImageModelDistributionSettingsObjectDetection
withEarlyStoppingDelay(String earlyStoppingDelay)
Set the earlyStoppingDelay property: Minimum number of epochs or validation evaluations to wait before primary metric improvement is tracked for early stopping.ImageModelDistributionSettingsObjectDetection
withEarlyStoppingPatience(String earlyStoppingPatience)
Set the earlyStoppingPatience property: Minimum number of epochs or validation evaluations with no primary metric improvement before the run is stopped.ImageModelDistributionSettingsObjectDetection
withEnableOnnxNormalization(String enableOnnxNormalization)
Set the enableOnnxNormalization property: Enable normalization when exporting ONNX model.ImageModelDistributionSettingsObjectDetection
withEvaluationFrequency(String evaluationFrequency)
Set the evaluationFrequency property: Frequency to evaluate validation dataset to get metric scores.ImageModelDistributionSettingsObjectDetection
withGradientAccumulationStep(String gradientAccumulationStep)
Set the gradientAccumulationStep property: 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.ImageModelDistributionSettingsObjectDetection
withImageSize(String imageSize)
Set the imageSize property: Image size for train and validation.ImageModelDistributionSettingsObjectDetection
withLayersToFreeze(String layersToFreeze)
Set the layersToFreeze property: Number of layers to freeze for the model.ImageModelDistributionSettingsObjectDetection
withLearningRate(String learningRate)
Set the learningRate property: Initial learning rate.ImageModelDistributionSettingsObjectDetection
withLearningRateScheduler(String learningRateScheduler)
Set the learningRateScheduler property: Type of learning rate scheduler.ImageModelDistributionSettingsObjectDetection
withMaxSize(String maxSize)
Set the maxSize property: Maximum size of the image to be rescaled before feeding it to the backbone.ImageModelDistributionSettingsObjectDetection
withMinSize(String minSize)
Set the minSize property: Minimum size of the image to be rescaled before feeding it to the backbone.ImageModelDistributionSettingsObjectDetection
withModelName(String modelName)
Set the modelName property: Name of the model to use for training.ImageModelDistributionSettingsObjectDetection
withModelSize(String modelSize)
Set the modelSize property: Model size.ImageModelDistributionSettingsObjectDetection
withMomentum(String momentum)
Set the momentum property: Value of momentum when optimizer is 'sgd'.ImageModelDistributionSettingsObjectDetection
withMultiScale(String multiScale)
Set the multiScale property: Enable multi-scale image by varying image size by +/- 50%.ImageModelDistributionSettingsObjectDetection
withNesterov(String nesterov)
Set the nesterov property: Enable nesterov when optimizer is 'sgd'.ImageModelDistributionSettingsObjectDetection
withNmsIouThreshold(String nmsIouThreshold)
Set the nmsIouThreshold property: IOU threshold used during inference in NMS post processing.ImageModelDistributionSettingsObjectDetection
withNumberOfEpochs(String numberOfEpochs)
Set the numberOfEpochs property: Number of training epochs.ImageModelDistributionSettingsObjectDetection
withNumberOfWorkers(String numberOfWorkers)
Set the numberOfWorkers property: Number of data loader workers.ImageModelDistributionSettingsObjectDetection
withOptimizer(String optimizer)
Set the optimizer property: Type of optimizer.ImageModelDistributionSettingsObjectDetection
withRandomSeed(String randomSeed)
Set the randomSeed property: Random seed to be used when using deterministic training.ImageModelDistributionSettingsObjectDetection
withSplitRatio(String splitRatio)
Set the splitRatio property: If validation data is not defined, this specifies the split ratio for splitting train data into random train and validation subsets.ImageModelDistributionSettingsObjectDetection
withStepLRGamma(String stepLRGamma)
Set the stepLRGamma property: Value of gamma when learning rate scheduler is 'step'.ImageModelDistributionSettingsObjectDetection
withStepLRStepSize(String stepLRStepSize)
Set the stepLRStepSize property: Value of step size when learning rate scheduler is 'step'.ImageModelDistributionSettingsObjectDetection
withTileGridSize(String tileGridSize)
Set the tileGridSize property: The grid size to use for tiling each image.ImageModelDistributionSettingsObjectDetection
withTileOverlapRatio(String tileOverlapRatio)
Set the tileOverlapRatio property: Overlap ratio between adjacent tiles in each dimension.ImageModelDistributionSettingsObjectDetection
withTilePredictionsNmsThreshold(String tilePredictionsNmsThreshold)
Set the tilePredictionsNmsThreshold property: The IOU threshold to use to perform NMS while merging predictions from tiles and image.ImageModelDistributionSettingsObjectDetection
withTrainingBatchSize(String trainingBatchSize)
Set the trainingBatchSize property: Training batch size.ImageModelDistributionSettingsObjectDetection
withValidationBatchSize(String validationBatchSize)
Set the validationBatchSize property: Validation batch size.ImageModelDistributionSettingsObjectDetection
withValidationIouThreshold(String validationIouThreshold)
Set the validationIouThreshold property: IOU threshold to use when computing validation metric.ImageModelDistributionSettingsObjectDetection
withValidationMetricType(String validationMetricType)
Set the validationMetricType property: Metric computation method to use for validation metrics.ImageModelDistributionSettingsObjectDetection
withWarmupCosineLRCycles(String warmupCosineLRCycles)
Set the warmupCosineLRCycles property: Value of cosine cycle when learning rate scheduler is 'warmup_cosine'.ImageModelDistributionSettingsObjectDetection
withWarmupCosineLRWarmupEpochs(String warmupCosineLRWarmupEpochs)
Set the warmupCosineLRWarmupEpochs property: Value of warmup epochs when learning rate scheduler is 'warmup_cosine'.ImageModelDistributionSettingsObjectDetection
withWeightDecay(String weightDecay)
Set the weightDecay property: Value of weight decay when optimizer is 'sgd', 'adam', or 'adamw'.-
Methods inherited from class com.azure.resourcemanager.machinelearning.models.ImageModelDistributionSettings
amsGradient, augmentations, beta1, beta2, distributed, earlyStopping, earlyStoppingDelay, earlyStoppingPatience, enableOnnxNormalization, evaluationFrequency, gradientAccumulationStep, layersToFreeze, learningRate, learningRateScheduler, modelName, momentum, nesterov, numberOfEpochs, numberOfWorkers, optimizer, randomSeed, splitRatio, stepLRGamma, stepLRStepSize, trainingBatchSize, validationBatchSize, warmupCosineLRCycles, warmupCosineLRWarmupEpochs, weightDecay
-
-
-
-
Method Detail
-
boxDetectionsPerImage
public String boxDetectionsPerImage()
Get the boxDetectionsPerImage property: Maximum number of detections per image, for all classes. Must be a positive integer. Note: This settings is not supported for the 'yolov5' algorithm.- Returns:
- the boxDetectionsPerImage value.
-
withBoxDetectionsPerImage
public ImageModelDistributionSettingsObjectDetection withBoxDetectionsPerImage(String boxDetectionsPerImage)
Set the boxDetectionsPerImage property: Maximum number of detections per image, for all classes. Must be a positive integer. Note: This settings is not supported for the 'yolov5' algorithm.- Parameters:
boxDetectionsPerImage
- the boxDetectionsPerImage value to set.- Returns:
- the ImageModelDistributionSettingsObjectDetection object itself.
-
boxScoreThreshold
public String boxScoreThreshold()
Get the boxScoreThreshold property: During inference, only return proposals with a classification score greater than BoxScoreThreshold. Must be a float in the range[0, 1].- Returns:
- the boxScoreThreshold value.
-
withBoxScoreThreshold
public ImageModelDistributionSettingsObjectDetection withBoxScoreThreshold(String boxScoreThreshold)
Set the boxScoreThreshold property: During inference, only return proposals with a classification score greater than BoxScoreThreshold. Must be a float in the range[0, 1].- Parameters:
boxScoreThreshold
- the boxScoreThreshold value to set.- Returns:
- the ImageModelDistributionSettingsObjectDetection object itself.
-
imageSize
public String imageSize()
Get the imageSize property: Image size for train and validation. Must be a positive integer. Note: The training run may get into CUDA OOM if the size is too big. Note: This settings is only supported for the 'yolov5' algorithm.- Returns:
- the imageSize value.
-
withImageSize
public ImageModelDistributionSettingsObjectDetection withImageSize(String imageSize)
Set the imageSize property: Image size for train and validation. Must be a positive integer. Note: The training run may get into CUDA OOM if the size is too big. Note: This settings is only supported for the 'yolov5' algorithm.- Parameters:
imageSize
- the imageSize value to set.- Returns:
- the ImageModelDistributionSettingsObjectDetection object itself.
-
maxSize
public String maxSize()
Get the maxSize property: Maximum size of the image to be rescaled before feeding it to the backbone. Must be a positive integer. Note: training run may get into CUDA OOM if the size is too big. Note: This settings is not supported for the 'yolov5' algorithm.- Returns:
- the maxSize value.
-
withMaxSize
public ImageModelDistributionSettingsObjectDetection withMaxSize(String maxSize)
Set the maxSize property: Maximum size of the image to be rescaled before feeding it to the backbone. Must be a positive integer. Note: training run may get into CUDA OOM if the size is too big. Note: This settings is not supported for the 'yolov5' algorithm.- Parameters:
maxSize
- the maxSize value to set.- Returns:
- the ImageModelDistributionSettingsObjectDetection object itself.
-
minSize
public String minSize()
Get the minSize property: Minimum size of the image to be rescaled before feeding it to the backbone. Must be a positive integer. Note: training run may get into CUDA OOM if the size is too big. Note: This settings is not supported for the 'yolov5' algorithm.- Returns:
- the minSize value.
-
withMinSize
public ImageModelDistributionSettingsObjectDetection withMinSize(String minSize)
Set the minSize property: Minimum size of the image to be rescaled before feeding it to the backbone. Must be a positive integer. Note: training run may get into CUDA OOM if the size is too big. Note: This settings is not supported for the 'yolov5' algorithm.- Parameters:
minSize
- the minSize value to set.- Returns:
- the ImageModelDistributionSettingsObjectDetection object itself.
-
modelSize
public String modelSize()
Get the modelSize property: Model size. Must be 'small', 'medium', 'large', or 'xlarge'. Note: training run may get into CUDA OOM if the model size is too big. Note: This settings is only supported for the 'yolov5' algorithm.- Returns:
- the modelSize value.
-
withModelSize
public ImageModelDistributionSettingsObjectDetection withModelSize(String modelSize)
Set the modelSize property: Model size. Must be 'small', 'medium', 'large', or 'xlarge'. Note: training run may get into CUDA OOM if the model size is too big. Note: This settings is only supported for the 'yolov5' algorithm.- Parameters:
modelSize
- the modelSize value to set.- Returns:
- the ImageModelDistributionSettingsObjectDetection object itself.
-
multiScale
public String multiScale()
Get the multiScale property: Enable multi-scale image by varying image size by +/- 50%. Note: training run may get into CUDA OOM if no sufficient GPU memory. Note: This settings is only supported for the 'yolov5' algorithm.- Returns:
- the multiScale value.
-
withMultiScale
public ImageModelDistributionSettingsObjectDetection withMultiScale(String multiScale)
Set the multiScale property: Enable multi-scale image by varying image size by +/- 50%. Note: training run may get into CUDA OOM if no sufficient GPU memory. Note: This settings is only supported for the 'yolov5' algorithm.- Parameters:
multiScale
- the multiScale value to set.- Returns:
- the ImageModelDistributionSettingsObjectDetection object itself.
-
nmsIouThreshold
public String nmsIouThreshold()
Get the nmsIouThreshold property: IOU threshold used during inference in NMS post processing. Must be float in the range [0, 1].- Returns:
- the nmsIouThreshold value.
-
withNmsIouThreshold
public ImageModelDistributionSettingsObjectDetection withNmsIouThreshold(String nmsIouThreshold)
Set the nmsIouThreshold property: IOU threshold used during inference in NMS post processing. Must be float in the range [0, 1].- Parameters:
nmsIouThreshold
- the nmsIouThreshold value to set.- Returns:
- the ImageModelDistributionSettingsObjectDetection object itself.
-
tileGridSize
public String tileGridSize()
Get the tileGridSize property: The grid size to use for tiling each image. Note: TileGridSize must not be None to enable small object detection logic. A string containing two integers in mxn format. Note: This settings is not supported for the 'yolov5' algorithm.- Returns:
- the tileGridSize value.
-
withTileGridSize
public ImageModelDistributionSettingsObjectDetection withTileGridSize(String tileGridSize)
Set the tileGridSize property: The grid size to use for tiling each image. Note: TileGridSize must not be None to enable small object detection logic. A string containing two integers in mxn format. Note: This settings is not supported for the 'yolov5' algorithm.- Parameters:
tileGridSize
- the tileGridSize value to set.- Returns:
- the ImageModelDistributionSettingsObjectDetection object itself.
-
tileOverlapRatio
public String tileOverlapRatio()
Get the tileOverlapRatio property: Overlap ratio between adjacent tiles in each dimension. Must be float in the range [0, 1). Note: This settings is not supported for the 'yolov5' algorithm.- Returns:
- the tileOverlapRatio value.
-
withTileOverlapRatio
public ImageModelDistributionSettingsObjectDetection withTileOverlapRatio(String tileOverlapRatio)
Set the tileOverlapRatio property: Overlap ratio between adjacent tiles in each dimension. Must be float in the range [0, 1). Note: This settings is not supported for the 'yolov5' algorithm.- Parameters:
tileOverlapRatio
- the tileOverlapRatio value to set.- Returns:
- the ImageModelDistributionSettingsObjectDetection object itself.
-
tilePredictionsNmsThreshold
public String tilePredictionsNmsThreshold()
Get the tilePredictionsNmsThreshold property: The IOU threshold to use to perform NMS while merging predictions from tiles and image. Used in validation/ inference. Must be float in the range [0, 1]. Note: This settings is not supported for the 'yolov5' algorithm. NMS: Non-maximum suppression.- Returns:
- the tilePredictionsNmsThreshold value.
-
withTilePredictionsNmsThreshold
public ImageModelDistributionSettingsObjectDetection withTilePredictionsNmsThreshold(String tilePredictionsNmsThreshold)
Set the tilePredictionsNmsThreshold property: The IOU threshold to use to perform NMS while merging predictions from tiles and image. Used in validation/ inference. Must be float in the range [0, 1]. Note: This settings is not supported for the 'yolov5' algorithm. NMS: Non-maximum suppression.- Parameters:
tilePredictionsNmsThreshold
- the tilePredictionsNmsThreshold value to set.- Returns:
- the ImageModelDistributionSettingsObjectDetection object itself.
-
validationIouThreshold
public String validationIouThreshold()
Get the validationIouThreshold property: IOU threshold to use when computing validation metric. Must be float in the range [0, 1].- Returns:
- the validationIouThreshold value.
-
withValidationIouThreshold
public ImageModelDistributionSettingsObjectDetection withValidationIouThreshold(String validationIouThreshold)
Set the validationIouThreshold property: IOU threshold to use when computing validation metric. Must be float in the range [0, 1].- Parameters:
validationIouThreshold
- the validationIouThreshold value to set.- Returns:
- the ImageModelDistributionSettingsObjectDetection object itself.
-
validationMetricType
public String validationMetricType()
Get the validationMetricType property: Metric computation method to use for validation metrics. Must be 'none', 'coco', 'voc', or 'coco_voc'.- Returns:
- the validationMetricType value.
-
withValidationMetricType
public ImageModelDistributionSettingsObjectDetection withValidationMetricType(String validationMetricType)
Set the validationMetricType property: Metric computation method to use for validation metrics. Must be 'none', 'coco', 'voc', or 'coco_voc'.- Parameters:
validationMetricType
- the validationMetricType value to set.- Returns:
- the ImageModelDistributionSettingsObjectDetection object itself.
-
withAmsGradient
public ImageModelDistributionSettingsObjectDetection withAmsGradient(String amsGradient)
Set the amsGradient property: Enable AMSGrad when optimizer is 'adam' or 'adamw'.- Overrides:
withAmsGradient
in classImageModelDistributionSettings
- Parameters:
amsGradient
- the amsGradient value to set.- Returns:
- the ImageModelDistributionSettings object itself.
-
withAugmentations
public ImageModelDistributionSettingsObjectDetection withAugmentations(String augmentations)
Set the augmentations property: Settings for using Augmentations.- Overrides:
withAugmentations
in classImageModelDistributionSettings
- Parameters:
augmentations
- the augmentations value to set.- Returns:
- the ImageModelDistributionSettings object itself.
-
withBeta1
public ImageModelDistributionSettingsObjectDetection withBeta1(String beta1)
Set the beta1 property: Value of 'beta1' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, 1].- Overrides:
withBeta1
in classImageModelDistributionSettings
- Parameters:
beta1
- the beta1 value to set.- Returns:
- the ImageModelDistributionSettings object itself.
-
withBeta2
public ImageModelDistributionSettingsObjectDetection withBeta2(String beta2)
Set the beta2 property: Value of 'beta2' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, 1].- Overrides:
withBeta2
in classImageModelDistributionSettings
- Parameters:
beta2
- the beta2 value to set.- Returns:
- the ImageModelDistributionSettings object itself.
-
withDistributed
public ImageModelDistributionSettingsObjectDetection withDistributed(String distributed)
Set the distributed property: Whether to use distributer training.- Overrides:
withDistributed
in classImageModelDistributionSettings
- Parameters:
distributed
- the distributed value to set.- Returns:
- the ImageModelDistributionSettings object itself.
-
withEarlyStopping
public ImageModelDistributionSettingsObjectDetection withEarlyStopping(String earlyStopping)
Set the earlyStopping property: Enable early stopping logic during training.- Overrides:
withEarlyStopping
in classImageModelDistributionSettings
- Parameters:
earlyStopping
- the earlyStopping value to set.- Returns:
- the ImageModelDistributionSettings object itself.
-
withEarlyStoppingDelay
public ImageModelDistributionSettingsObjectDetection withEarlyStoppingDelay(String earlyStoppingDelay)
Set the earlyStoppingDelay property: Minimum number of epochs or validation evaluations to wait before primary metric improvement is tracked for early stopping. Must be a positive integer.- Overrides:
withEarlyStoppingDelay
in classImageModelDistributionSettings
- Parameters:
earlyStoppingDelay
- the earlyStoppingDelay value to set.- Returns:
- the ImageModelDistributionSettings object itself.
-
withEarlyStoppingPatience
public ImageModelDistributionSettingsObjectDetection withEarlyStoppingPatience(String earlyStoppingPatience)
Set the earlyStoppingPatience property: Minimum number of epochs or validation evaluations with no primary metric improvement before the run is stopped. Must be a positive integer.- Overrides:
withEarlyStoppingPatience
in classImageModelDistributionSettings
- Parameters:
earlyStoppingPatience
- the earlyStoppingPatience value to set.- Returns:
- the ImageModelDistributionSettings object itself.
-
withEnableOnnxNormalization
public ImageModelDistributionSettingsObjectDetection withEnableOnnxNormalization(String enableOnnxNormalization)
Set the enableOnnxNormalization property: Enable normalization when exporting ONNX model.- Overrides:
withEnableOnnxNormalization
in classImageModelDistributionSettings
- Parameters:
enableOnnxNormalization
- the enableOnnxNormalization value to set.- Returns:
- the ImageModelDistributionSettings object itself.
-
withEvaluationFrequency
public ImageModelDistributionSettingsObjectDetection withEvaluationFrequency(String evaluationFrequency)
Set the evaluationFrequency property: Frequency to evaluate validation dataset to get metric scores. Must be a positive integer.- Overrides:
withEvaluationFrequency
in classImageModelDistributionSettings
- Parameters:
evaluationFrequency
- the evaluationFrequency value to set.- Returns:
- the ImageModelDistributionSettings object itself.
-
withGradientAccumulationStep
public ImageModelDistributionSettingsObjectDetection withGradientAccumulationStep(String gradientAccumulationStep)
Set the gradientAccumulationStep property: 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.- Overrides:
withGradientAccumulationStep
in classImageModelDistributionSettings
- Parameters:
gradientAccumulationStep
- the gradientAccumulationStep value to set.- Returns:
- the ImageModelDistributionSettings object itself.
-
withLayersToFreeze
public ImageModelDistributionSettingsObjectDetection withLayersToFreeze(String layersToFreeze)
Set the layersToFreeze property: 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.- Overrides:
withLayersToFreeze
in classImageModelDistributionSettings
- Parameters:
layersToFreeze
- the layersToFreeze value to set.- Returns:
- the ImageModelDistributionSettings object itself.
-
withLearningRate
public ImageModelDistributionSettingsObjectDetection withLearningRate(String learningRate)
Set the learningRate property: Initial learning rate. Must be a float in the range [0, 1].- Overrides:
withLearningRate
in classImageModelDistributionSettings
- Parameters:
learningRate
- the learningRate value to set.- Returns:
- the ImageModelDistributionSettings object itself.
-
withLearningRateScheduler
public ImageModelDistributionSettingsObjectDetection withLearningRateScheduler(String learningRateScheduler)
Set the learningRateScheduler property: Type of learning rate scheduler. Must be 'warmup_cosine' or 'step'.- Overrides:
withLearningRateScheduler
in classImageModelDistributionSettings
- Parameters:
learningRateScheduler
- the learningRateScheduler value to set.- Returns:
- the ImageModelDistributionSettings object itself.
-
withModelName
public ImageModelDistributionSettingsObjectDetection withModelName(String modelName)
Set the modelName property: 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.- Overrides:
withModelName
in classImageModelDistributionSettings
- Parameters:
modelName
- the modelName value to set.- Returns:
- the ImageModelDistributionSettings object itself.
-
withMomentum
public ImageModelDistributionSettingsObjectDetection withMomentum(String momentum)
Set the momentum property: Value of momentum when optimizer is 'sgd'. Must be a float in the range [0, 1].- Overrides:
withMomentum
in classImageModelDistributionSettings
- Parameters:
momentum
- the momentum value to set.- Returns:
- the ImageModelDistributionSettings object itself.
-
withNesterov
public ImageModelDistributionSettingsObjectDetection withNesterov(String nesterov)
Set the nesterov property: Enable nesterov when optimizer is 'sgd'.- Overrides:
withNesterov
in classImageModelDistributionSettings
- Parameters:
nesterov
- the nesterov value to set.- Returns:
- the ImageModelDistributionSettings object itself.
-
withNumberOfEpochs
public ImageModelDistributionSettingsObjectDetection withNumberOfEpochs(String numberOfEpochs)
Set the numberOfEpochs property: Number of training epochs. Must be a positive integer.- Overrides:
withNumberOfEpochs
in classImageModelDistributionSettings
- Parameters:
numberOfEpochs
- the numberOfEpochs value to set.- Returns:
- the ImageModelDistributionSettings object itself.
-
withNumberOfWorkers
public ImageModelDistributionSettingsObjectDetection withNumberOfWorkers(String numberOfWorkers)
Set the numberOfWorkers property: Number of data loader workers. Must be a non-negative integer.- Overrides:
withNumberOfWorkers
in classImageModelDistributionSettings
- Parameters:
numberOfWorkers
- the numberOfWorkers value to set.- Returns:
- the ImageModelDistributionSettings object itself.
-
withOptimizer
public ImageModelDistributionSettingsObjectDetection withOptimizer(String optimizer)
Set the optimizer property: Type of optimizer. Must be either 'sgd', 'adam', or 'adamw'.- Overrides:
withOptimizer
in classImageModelDistributionSettings
- Parameters:
optimizer
- the optimizer value to set.- Returns:
- the ImageModelDistributionSettings object itself.
-
withRandomSeed
public ImageModelDistributionSettingsObjectDetection withRandomSeed(String randomSeed)
Set the randomSeed property: Random seed to be used when using deterministic training.- Overrides:
withRandomSeed
in classImageModelDistributionSettings
- Parameters:
randomSeed
- the randomSeed value to set.- Returns:
- the ImageModelDistributionSettings object itself.
-
withSplitRatio
public ImageModelDistributionSettingsObjectDetection withSplitRatio(String splitRatio)
Set the splitRatio property: If validation data is not defined, this specifies the split ratio for splitting train data into random train and validation subsets. Must be a float in the range [0, 1].- Overrides:
withSplitRatio
in classImageModelDistributionSettings
- Parameters:
splitRatio
- the splitRatio value to set.- Returns:
- the ImageModelDistributionSettings object itself.
-
withStepLRGamma
public ImageModelDistributionSettingsObjectDetection withStepLRGamma(String stepLRGamma)
Set the stepLRGamma property: Value of gamma when learning rate scheduler is 'step'. Must be a float in the range [0, 1].- Overrides:
withStepLRGamma
in classImageModelDistributionSettings
- Parameters:
stepLRGamma
- the stepLRGamma value to set.- Returns:
- the ImageModelDistributionSettings object itself.
-
withStepLRStepSize
public ImageModelDistributionSettingsObjectDetection withStepLRStepSize(String stepLRStepSize)
Set the stepLRStepSize property: Value of step size when learning rate scheduler is 'step'. Must be a positive integer.- Overrides:
withStepLRStepSize
in classImageModelDistributionSettings
- Parameters:
stepLRStepSize
- the stepLRStepSize value to set.- Returns:
- the ImageModelDistributionSettings object itself.
-
withTrainingBatchSize
public ImageModelDistributionSettingsObjectDetection withTrainingBatchSize(String trainingBatchSize)
Set the trainingBatchSize property: Training batch size. Must be a positive integer.- Overrides:
withTrainingBatchSize
in classImageModelDistributionSettings
- Parameters:
trainingBatchSize
- the trainingBatchSize value to set.- Returns:
- the ImageModelDistributionSettings object itself.
-
withValidationBatchSize
public ImageModelDistributionSettingsObjectDetection withValidationBatchSize(String validationBatchSize)
Set the validationBatchSize property: Validation batch size. Must be a positive integer.- Overrides:
withValidationBatchSize
in classImageModelDistributionSettings
- Parameters:
validationBatchSize
- the validationBatchSize value to set.- Returns:
- the ImageModelDistributionSettings object itself.
-
withWarmupCosineLRCycles
public ImageModelDistributionSettingsObjectDetection withWarmupCosineLRCycles(String warmupCosineLRCycles)
Set the warmupCosineLRCycles property: Value of cosine cycle when learning rate scheduler is 'warmup_cosine'. Must be a float in the range [0, 1].- Overrides:
withWarmupCosineLRCycles
in classImageModelDistributionSettings
- Parameters:
warmupCosineLRCycles
- the warmupCosineLRCycles value to set.- Returns:
- the ImageModelDistributionSettings object itself.
-
withWarmupCosineLRWarmupEpochs
public ImageModelDistributionSettingsObjectDetection withWarmupCosineLRWarmupEpochs(String warmupCosineLRWarmupEpochs)
Set the warmupCosineLRWarmupEpochs property: Value of warmup epochs when learning rate scheduler is 'warmup_cosine'. Must be a positive integer.- Overrides:
withWarmupCosineLRWarmupEpochs
in classImageModelDistributionSettings
- Parameters:
warmupCosineLRWarmupEpochs
- the warmupCosineLRWarmupEpochs value to set.- Returns:
- the ImageModelDistributionSettings object itself.
-
withWeightDecay
public ImageModelDistributionSettingsObjectDetection withWeightDecay(String weightDecay)
Set the weightDecay property: Value of weight decay when optimizer is 'sgd', 'adam', or 'adamw'. Must be a float in the range[0, 1].- Overrides:
withWeightDecay
in classImageModelDistributionSettings
- Parameters:
weightDecay
- the weightDecay value to set.- Returns:
- the ImageModelDistributionSettings object itself.
-
validate
public void validate()
Validates the instance.- Overrides:
validate
in classImageModelDistributionSettings
- Throws:
IllegalArgumentException
- thrown if the instance is not valid.
-
-