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

# transpose(axes:)

Adds a transpose operation to the current graph.

## Declaration

```swift
func transpose(axes: [Int]) -> BNNSGraph.Builder.Tensor<T>
```

## Parameters

- `axes`: An array that specifies the order in which the operation permutes the dimensions. For example, specify an axes of [0, 1, 3, 2] to specify that the operation swaps the last two dimensions of a 4D tensor.
