<!--
{
  "availability" : [
    "macOS: 11.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CreateML",
  "identifier" : "/documentation/CreateML/MLObjectDetector/restoreTrainingSession(sessionParameters:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "Create ML",
      "CreateML"
    ],
    "preciseIdentifier" : "s:8CreateML16MLObjectDetectorV22restoreTrainingSession17sessionParametersAA010MLTrainingG0CyACGAA0jgI0V_tKFZ"
  },
  "title" : "restoreTrainingSession(sessionParameters:)"
}
-->

# restoreTrainingSession(sessionParameters:)

Creates an asynchronous training session for an object detector by restoring an existing training session’s
state from its parameters.

```
static func restoreTrainingSession(sessionParameters: MLTrainingSessionParameters) throws -> MLTrainingSession<MLObjectDetector>
```

## Parameters

`sessionParameters`

The [`MLTrainingSessionParameters`](/documentation/CreateML/MLTrainingSessionParameters) instance you used to create the training session
with [`makeTrainingSession(trainingData:annotationType:parameters:sessionParameters:)`](/documentation/CreateML/MLObjectDetector/makeTrainingSession(trainingData:annotationType:parameters:sessionParameters:)).

## Return Value

An [`MLTrainingSession`](/documentation/CreateML/MLTrainingSession) that represents the object-detector training session.

## Discussion

Use [`resume(_:)`](/documentation/CreateML/MLObjectDetector/resume(_:)) to start the [`MLTrainingSession`](/documentation/CreateML/MLTrainingSession) instance you get from this method.

---

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)