---
title: "setInputDimensions(_:bufferIndex:)"
framework: metal
role: symbol
role_heading: Instance Method
path: "metal/mtl4machinelearningpipelinedescriptor/setinputdimensions(_:bufferindex:)-34gir"
---

# setInputDimensions(_:bufferIndex:)

Sets the dimension of an input tensor at a buffer index.

## Declaration

```swift
func setInputDimensions(_ dimensions: MTLTensorExtents?, bufferIndex: Int)
```

## Parameters

- `dimensions`: The dimensions of the tensor.
- `bufferIndex`: Index of the tensor to modify.
