---
title: "init(operation: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/mlcsoftmaxlayer/init(operation:dimension:)"
---

# init(operation:dimension:)

Creates a softmax layer with the operation and dimension you specify.

## Declaration

```swift
convenience init(operation: MLCSoftmaxOperation, dimension: Int)
```

## Parameters

- `operation`: The softmax operation.
- `dimension`: The dimension over which you perform the softmax operation.

## See Also

### Creating Softmax Layers

- [init(operation:)](mlcompute/mlcsoftmaxlayer/init(operation:).md)
- [MLCSoftmaxOperation](mlcompute/mlcsoftmaxoperation.md)
