---
title: "pad(_:padding:)"
framework: accelerate
role: symbol
role_heading: Instance Method
path: "accelerate/bnnsgraph/builder/tensor/pad(_:padding:)"
---

# pad(_:padding:)

Adds a padding operation to the graph

## Declaration

```swift
func pad(_ type: BNNSGraph.Builder.Padding, padding: [Int]) -> BNNSGraph.Builder.Tensor<T>
```

## Parameters

- `type`: The padding type.
- `padding`: An array of integer values that contains an even count of elements. Each contiguous pair of elements specifies the before (for example, top or left) and after (for example, bottom or right) padding.
