activation_softshrink: Softshrink

View source: R/activations.R

activation_softshrinkR Documentation

Softshrink

Description

Soft shrink function.

Usage

activation_softshrink(x, lower = -0.5, upper = 0.5)

Arguments

x

A 'Tensor'. Must be one of the following types: 'float16', 'float32', 'float64'.

lower

'float', lower bound for setting values to zeros.

upper

'float', upper bound for setting values to zeros. Returns: A 'Tensor'. Has the same type as 'x'.

Details

Computes soft shrink function: 'x - lower if x < lower, x - upper if x > upper else 0'.

Value

A 'Tensor'. Has the same type as 'x'.

Computes soft shrink function

'x - lower if x < lower, x - upper if x > upper else 0'.


henry090/tfaddons documentation built on April 7, 2022, 11:27 p.m.