<!--
{
  "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/MLImageClassifier/makeTrainingSession(trainingData:parameters:sessionParameters:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "Create ML",
      "CreateML"
    ],
    "preciseIdentifier" : "s:8CreateML17MLImageClassifierV19makeTrainingSession12trainingData10parameters17sessionParametersAA010MLTrainingG0CyACGAC0I6SourceO_AC05ModelL0VAA0mgL0VtKFZ"
  },
  "title" : "makeTrainingSession(trainingData:parameters:sessionParameters:)"
}
-->

# makeTrainingSession(trainingData:parameters:sessionParameters:)

Creates or restores a training session.

```
static func makeTrainingSession(trainingData: MLImageClassifier.DataSource, parameters: MLImageClassifier.ModelParameters = ModelParameters(
            validation: .split(strategy: .automatic),
            augmentation: [],
            algorithm: .transferLearning(
                featureExtractor: .scenePrint(revision: 1),
                classifier: .logisticRegressor
            )
        ), sessionParameters: MLTrainingSessionParameters = _defaultSessionParameters) throws -> MLTrainingSession<MLImageClassifier>
```

## Parameters

`trainingData`

Data source for training.

`parameters`

Model training parameters. See [`MLImageClassifier.ModelParameters`](/documentation/CreateML/MLImageClassifier/ModelParameters-swift.struct) for the defaults.

`sessionParameters`

Training session parameters. See [`MLTrainingSessionParameters`](/documentation/CreateML/MLTrainingSessionParameters) for the defaults.

## Return Value

A `MLTrainingSession` that can be used to start or resume training.

---

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)