nnf_hardshrink: Hardshrink

View source: R/nnf-activation.R

nnf_hardshrinkR Documentation

Hardshrink

Description

Applies the hard shrinkage function element-wise

Usage

nnf_hardshrink(input, lambd = 0.5)

Arguments

input

(N,*) tensor, where * means, any number of additional dimensions

lambd

the lambda value for the Hardshrink formulation. Default: 0.5


torch documentation built on Aug. 21, 2025, 5:50 p.m.