---
title: "argMax(axis:keepDimension:)"
framework: accelerate
role: symbol
role_heading: Instance Method
path: "accelerate/bnnsgraph/builder/tensor/argmax(axis:keepdimension:)"
---

# argMax(axis:keepDimension:)

Adds an argmax operation to the current graph.

## Declaration

```swift
func argMax(axis: Int, keepDimension: Bool) -> BNNSGraph.Builder.Tensor<Int32>
```

## Discussion

Discussion This function calculates the first index of the maximum value in the tensor.
