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

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

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

# hardshrinkInPlace

[common]\
fun [hardshrinkInPlace](hardshrinkInPlace.md)(self: [Tensor](../Tensor/index.md), lambd: [Double](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double/index.html) = 0.5): [Tensor](../Tensor/index.md)

`hardshrinkInPlace(self: Tensor, lambd: Double = 0.5)`: the `hardshrink_` operator. In-place `hardshrink`: writes the result through `self`; same formula, arguments, and error conditions as `hardshrink()`. A view input writes through its base storage. Returns `self` under the value surface, `Result<void>` under the `Result` surface; `CLIKART_CHECK` is the mode-stable spelling. Writes through `self` and returns it, so calls chain.