---
title: "softmax(axis:)"
framework: accelerate
role: symbol
role_heading: Instance Method
path: "accelerate/bnnsgraph/builder/tensor/softmax(axis:)"
---

# softmax(axis:)

Adds a softmax along the given axis operation to the current graph.

## Declaration

```swift
func softmax(axis: Int) -> BNNSGraph.Builder.Tensor<T>
```

## Parameters

- `axis`: The axis over which the operation computes softmax.
