---
title: "init(shape:)"
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/mlcreshapelayer/init(shape:)"
---

# init(shape:)

Creates a reshape layer with the shape you specify.

## Declaration

```swift
convenience init?(shape: [Int])
```

## Parameters

- `shape`: An array that contains the size of each dimension.
