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

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

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

# threshold

[common]\
fun [threshold](threshold.md)(input: [Tensor](../Tensor/index.md), threshold: [Double](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double/index.html), value: [Double](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double/index.html)): [Tensor](../Tensor/index.md)

`threshold(input: Tensor, threshold: Double, value: Double)`: the `threshold` operator. Elementwise threshold: keeps values above `threshold`, replaces the rest with `value`.