r"""Applies the element-wise function: .. math:: \text{gelu}(x) = x\Phi(x) where :math:`\Phi(x)` is the Cumulative Distribution Function for Gaussian Distribution.
(x)
| 890 | |
| 891 | |
| 892 | def gelu(x): |
| 893 | r"""Applies the element-wise function: |
| 894 | |
| 895 | .. math:: |
| 896 | \text{gelu}(x) = x\Phi(x) |
| 897 | |
| 898 | where :math:`\Phi(x)` is the Cumulative Distribution Function for Gaussian Distribution. |
| 899 | """ |
| 900 | return _elwise(x, mode=Elemwise.Mode.GELU) |
| 901 | |
| 902 | |
| 903 | def softplus(inp: Tensor) -> Tensor: |