oneflow.selu¶
-
oneflow.
selu
(x: Tensor) → Tensor¶ Applies element-wise function
\[ext{SELU}(x) = scale * (\max(0,x) + \min(0, lpha * (\exp(x) - 1)))`, with :math:`lpha=1.6732632423543772848170429916717` and :math:`scale=1.0507009873554804934193349852946`.\]See
SELU
for more details.For examples:
>>> import numpy as np >>> import oneflow as flow >>> x = np.array([1, 2, 3]).astype(np.float32) >>> input = flow.tensor(x) >>> out = flow.nn.functional.selu(input) >>> out tensor([1.0507, 2.1014, 3.1521], dtype=oneflow.float32)