For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /max/get-started.md).
Mojo function
silu
silu[dtype: DType, width: Int](x: SIMD[dtype, width]) -> SIMD[dtype, width] where dtype.is_floating_point()
Sigmoid Linear Unit (SiLU) activation function.
Computes x * sigmoid(x) = x / (1 + exp(-x)).
Constraints:
The dtype must be a floating-point type.
Args:
- x (
SIMD[dtype, width]): Input SIMD vector.
Returns:
SIMD[dtype, width]: SiLU activation applied element-wise.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!