<!--
{
  "availability" : [
    "macOS: 10.15.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CreateML",
  "identifier" : "/documentation/CreateML/MLObjectDetector/ModelParameters-swift.struct/batchSize",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Create ML"
    ],
    "preciseIdentifier" : "s:8CreateML16MLObjectDetectorV15ModelParametersV9batchSizeSiSgvp"
  },
  "title" : "batchSize"
}
-->

# batchSize

The number of images the training session can use in a training iteration.

```
var batchSize: Int?
```

## Discussion

If you don’t have a preference, set this property to `nil` to tell Create ML to use an appropriate value
when it trains the model.

---

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)