<!--
{
  "availability" : [
    "iOS: 14.0.0 - 17.4.0",
    "iPadOS: 14.0.0 - 17.4.0",
    "macCatalyst: 14.0.0 - 17.4.0",
    "macOS: 11.0.0 - 14.3.0",
    "tvOS: 14.0.0 - 17.4.0"
  ],
  "documentType" : "symbol",
  "framework" : "MLCompute",
  "identifier" : "/documentation/MLCompute/MLCSoftmaxLayer",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "ML Compute"
    ],
    "preciseIdentifier" : "c:objc(cs)MLCSoftmaxLayer"
  },
  "title" : "MLCSoftmaxLayer"
}
-->

# MLCSoftmaxLayer

A layer that outputs a probability distribution as attention weights.

```
class MLCSoftmaxLayer
```

## Topics

### Creating Softmax Layers

[`init(operation:)`](/documentation/MLCompute/MLCSoftmaxLayer/init(operation:))

Creates a softmax layer with the operation you specify.

[`init(operation:dimension:)`](/documentation/MLCompute/MLCSoftmaxLayer/init(operation:dimension:))

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

[`MLCSoftmaxOperation`](/documentation/MLCompute/MLCSoftmaxOperation)

A softmax operation.

### Inspecting Softmax Layers

[`operation`](/documentation/MLCompute/MLCSoftmaxLayer/operation)

The softmax operation.

[`dimension`](/documentation/MLCompute/MLCSoftmaxLayer/dimension)

The dimension over which you want to perform the softmax operation.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)