nnf_hardshrink function

Hardshrink

Hardshrink

Applies the hard shrinkage function element-wise

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
  • Maintainer: Daniel Falbel
  • License: MIT + file LICENSE
  • Last published: 2025-02-14