Skip to contents

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