---
title: "ClikaRT::ops::hardshrink_"
sidebar_label: "hardshrink_"
description: "In-place hardshrink: writes the result through self; same formula, arguments, and error conditions as hardshrink(). A view input writes through its base storage."
---

<!-- Generated by tools/doxygen2mdx from Doxygen XML. Do not edit. -->

<span class="api-kind api-kind--function">function</span>

## hardshrink\_() {#hardshrink_}

<div class="api-signature">

[`Tensor`](../Tensor.md)`&` **`hardshrink_`**([`Tensor`](../Tensor.md)`&` `self`, `double` `lambd` `=` `0.5`)

</div>

In-place [`hardshrink`](./hardshrink.md#hardshrink): writes the result through `self`; same formula, arguments, and error conditions as [`hardshrink()`](./hardshrink.md#hardshrink). A view input writes through its base storage. Returns `self` under the value surface, [`Result`](../Result.md)`<void>` under the [`Result`](../Result.md) surface; [`CLIKART_CHECK`](../../index.md#CLIKART_CHECK) is the mode-stable spelling.

<div class="api-declared">

Declared in `ClikaRT/compute/ops.h`, line 837

</div>
