---
title: "init(splitSectionLengths:dimension:)"
framework: ML Compute
role: symbol
role_heading: Initializer
platforms: [iOS 14.0+, iPadOS 14.0+, Mac Catalyst 14.0+, macOS 11.0+, tvOS 14.0+]
path: "mlcompute/mlcsplitlayer/init(splitsectionlengths:dimension:)"
---

# init(splitSectionLengths:dimension:)

Creates a split layer with the lengths of each split section and dimension you specify.

## Declaration

```swift
convenience init(splitSectionLengths: [Int], dimension: Int)
```

## Parameters

- `splitSectionLengths`: An array that contains the lengths of each split section.
- `dimension`: The dimension or axis along which to split the tensor.

## See Also

### Creating Split Layers

- [init(splitCount:dimension:)](mlcompute/mlcsplitlayer/init(splitcount:dimension:).md)
