<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "MetalPerformanceShaders",
  "identifier" : "/documentation/MetalPerformanceShaders/MPSNNPadding",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "Metal Performance Shaders"
    ],
    "preciseIdentifier" : "c:objc(pl)MPSNNPadding"
  },
  "title" : "MPSNNPadding"
}
-->

# MPSNNPadding

The protocol that provides a description of how kernels should pad images.

```
protocol MPSNNPadding : NSSecureCoding, NSObjectProtocol
```

## Topics

### Instance Methods

[`-  destinationImageDescriptorForSourceImages:sourceStates:forKernel:suggestedDescriptor:`](/documentation/MetalPerformanceShaders/MPSNNPadding/destinationImageDescriptor(forSourceImages:sourceStates:for:suggestedDescriptor:))

[`MPSImage`](/documentation/MetalPerformanceShaders/MPSImage)

A texture that may have more than four channels for use in convolutional neural networks.

[`MPSState`](/documentation/MetalPerformanceShaders/MPSState)

An opaque data container for large storage in MPS CNN filters.

[`MPSKernel`](/documentation/MetalPerformanceShaders/MPSKernel)

A standard interface for Metal Performance Shaders kernels.

[`MPSImageDescriptor`](/documentation/MetalPerformanceShaders/MPSImageDescriptor)

A description of the attributes used to create an [`MPSImage`](/documentation/MetalPerformanceShaders/MPSImage).

[`-  paddingMethod`](/documentation/MetalPerformanceShaders/MPSNNPadding/paddingMethod())

[`-  label`](/documentation/MetalPerformanceShaders/MPSNNPadding/label())

[`-  inverse`](/documentation/MetalPerformanceShaders/MPSNNPadding/inverse())

## Relationships

### Inherits From

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`NSCoding`](/documentation/Foundation/NSCoding)

[`NSSecureCoding`](/documentation/Foundation/NSSecureCoding)

### Conforming Types

[`MPSNNDefaultPadding`](/documentation/MetalPerformanceShaders/MPSNNDefaultPadding)

---

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)