---
title: "clamp"
sidebar_label: "clamp"
description: "Kotlin binding reference: clamp."
---

<!-- Generated by tools/api_reference/generate_api_docs.py. Do not edit. -->

//[clika-runtime](../../../index.md)/[io.clika.runtime](../index.md)/[Ops](index.md)/[clamp](clamp.md)

# clamp

[common]\
fun [clamp](clamp.md)(input: [Tensor](../Tensor/index.md), min: [Tensor](../Tensor/index.md)? = null, max: [Tensor](../Tensor/index.md)? = null): [Tensor](../Tensor/index.md)

`clamp(input: Tensor, min: Tensor? = null, max: Tensor? = null)`: the `clamp` operator. Clamp `input` into min, max; an empty bound leaves that side unbounded.