Softsign#
- class brainstate.nn.Softsign(name=None)#
Applies the element-wise function.
\[\text{SoftSign}(x) = \frac{x}{ 1 + |x|}\]Shape#
Input: \((*)\), where \(*\) means any number of dimensions.
Output: \((*)\), same shape as the input.
Examples
>>> import brainstate.nn as nn >>> import brainstate >>> m = nn.Softsign() >>> x = brainstate.random.randn(2) >>> output = m(x)