With the initializers for MLImageClassifier.ModelParameters being deprecated, what is the easiest way of increasing the iterations being performed?
MLImageClassifier.ModelParameters
still has the
init(validation: ValidationData,
maxIterations: Int,
augmentation: ImageAugmentationOptions,
algorithm: ModelAlgorithmType)
initializer, which you can use to set the maxIterations
along with other parameters that you want.
There are a few other initializers that were deprecated so if you are trying to use one of those old ones to set the maxIterations
, you will get this warning.
Note that this particular initializer has no default value for augmentation . So, when you call this initializer you need to pass the augmentation parameter as well. If you don't want to set any augmentation, you can just pass a value of 0 for this parameter. If you do not specify augmentation in the init at all, one of the old initializers will be used and hence you will get the deprecated warning.