Skip to main content

Mojo function

relu

relu[dtype: DType, simd_width: Int](x: SIMD[dtype, simd_width]) -> SIMD[dtype, simd_width]

Compute the Relu Op using the equation max(x,0)max(x, 0).

Parameters:

  • โ€‹dtype (DType): DType used for the computation.
  • โ€‹simd_width (Int): SIMD width used for the computation.

Args:

Returns:

SIMD[dtype, simd_width]: The result of the RELU operation.