Rectified linear activation module
mlx_relu.RdRectified linear activation module
Examples
act <- mlx_relu()
x <- as_mlx(matrix(c(-1, 0, 2), 3, 1))
mlx_forward(act, x)
#> mlx array [3 x 1]
#>   dtype: float32
#>   device: gpu
#>   values:
#>      [,1]
#> [1,]    0
#> [2,]    0
#> [3,]    2