---
title: "init(dimension:)"
framework: ML Compute
role: symbol
role_heading: Initializer
platforms: [iOS 14.5+, iPadOS 14.5+, Mac Catalyst 14.5+, macOS 11.3+, tvOS 14.5+]
path: "mlcompute/mlcgatherlayer/init(dimension:)"
---

# init(dimension:)

Creates a gather layer with the dimension you specify.

## Declaration

```swift
convenience init(dimension: Int)
```

## Parameters

- `dimension`: The dimension to index.
