oneflow.mish¶
-
oneflow.
mish
(x: Tensor) → Tensor¶ Applies the element-wise function:
\[ext{mish}(x) = x * ext{tanh}( ext{softplus}(x))\]For example:
>>> import numpy as np >>> import oneflow as flow >>> x = np.array([1, 2, 3]).astype(np.float32) >>> input = flow.tensor(x) >>> out = flow.mish(input) >>> out tensor([0.8651, 1.9440, 2.9865], dtype=oneflow.float32)
See
Mish
for more details.