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

# squeeze(axis:)

Adds a squeeze operation in the graph.

## Declaration

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

## Parameters

- `axis`: The axis at which the operation removes the dimension

## Discussion

Discussion This operation deletes a dimension of size 1 at the given index.
