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

# clip(to:)

Adds an element-wise clip operation to the current graph.

## Declaration

```swift
func clip(to bounds: ClosedRange<Float>) -> BNNSGraph.Builder.Tensor<T>
```

## Parameters

- `bounds`: The bounds that the operations clips the values to.
