<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 11.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CreateML",
  "identifier" : "/documentation/CreateML/MLStyleTransfer/ModelParameters/init(algorithm:validation:maxIterations:textelDensity:styleStrength:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Create ML"
    ],
    "preciseIdentifier" : "s:8CreateML15MLStyleTransferV15ModelParametersV9algorithm10validation13maxIterations13textelDensity13styleStrengthA2E0E13AlgorithmTypeO_AE14ValidationDataOS3itcfc"
  },
  "title" : "init(algorithm:validation:maxIterations:textelDensity:styleStrength:)"
}
-->

# init(algorithm:validation:maxIterations:textelDensity:styleStrength:)

Creates a new set of training parameters for a style transfer model.

```
init(algorithm: MLStyleTransfer.ModelParameters.ModelAlgorithmType = .cnn, validation: MLStyleTransfer.ModelParameters.ValidationData = .none, maxIterations: Int = MLStyleTransfer.__Defaults.maxIterations, textelDensity: Int = MLStyleTransfer.__Defaults.textelDensity, styleStrength: Int = MLStyleTransfer.__Defaults.styleStrength)
```

## Parameters

`algorithm`

The style transfer task’s training algorithm that prioritizes either speed or quality.

`validation`

The style transfer model’s validation dataset.

`maxIterations`

The largest number of training iterations the style transfer model can use.

`textelDensity`

The amount of detail the task applies from the input style image to the stylized image
output.

`styleStrength`

The amount of influence the style image has in the stylized image output.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)