# tensorplay.nn.functional.silu

Source: https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.silu.html

# tensorplay.nn.functional.silu

tensorplay.nn.functional.silu(input: TensorBase, inplace: [bool](https://docs.python.org/3/library/functions.html#bool) = False) &#x2192; TensorBase[[source]](../_modules/tensorplay/nn/functional.html#silu)

Apply the Sigmoid Linear Unit (SiLU) function, element-wise.

The SiLU function is also known as the swish function.

\[\text{silu}(x) = x * \sigma(x), \text{where } \sigma(x) \text{ is the logistic sigmoid.}\]

Note

See [Gaussian Error Linear Units (GELUs)](https://arxiv.org/abs/1606.08415)
where the SiLU (Sigmoid Linear Unit) was originally coined, and see
[Sigmoid-Weighted Linear Units for Neural Network Function Approximation in Reinforcement Learning](https://arxiv.org/abs/1702.03118) and [Swish: a Self-Gated Activation Function](https://arxiv.org/abs/1710.05941v1)
where the SiLU was experimented with later.

See SiLU for more details.
