<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -",
    "macCatalyst: 18.0.0 -",
    "macOS: 15.0.0 -",
    "tvOS: 18.0.0 -",
    "visionOS: 2.0.0 -",
    "watchOS: 11.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreML",
  "identifier" : "/documentation/CoreML/MLTensor/PaddingMode",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "Core ML",
      "CoreML"
    ],
    "preciseIdentifier" : "s:6CoreML8MLTensorV11PaddingModeO"
  },
  "title" : "MLTensor.PaddingMode"
}
-->

# MLTensor.PaddingMode

A mode that dictates how a tensor is padded.

```
enum PaddingMode
```

## Topics

### Padding modes

[`case constant(Float)`](/documentation/CoreML/MLTensor/PaddingMode/constant(_:))

Pads the input tensor boundaries with a constant value.

[`case reflection`](/documentation/CoreML/MLTensor/PaddingMode/reflection)

Pads the input tensor using the reflection of the input boundary.

[`case symmetric`](/documentation/CoreML/MLTensor/PaddingMode/symmetric)

Pads the input tensor using the reflection of the input, including the edge value.

## Relationships

### Conforms To

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Escapable`](/documentation/Swift/Escapable)

[`Sendable`](/documentation/Swift/Sendable)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`Hashable`](/documentation/Swift/Hashable)

[`Copyable`](/documentation/Swift/Copyable)

[`Equatable`](/documentation/Swift/Equatable)

---

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)