mlx_rs::nn

Function glu

Source
pub fn glu(x: impl AsRef<Array>, axis: impl Into<Option<i32>>) -> Result<Array>
Expand description

Applies the gated linear unit function.

This function splits the axis dimension of the input into two halves (a and b) and applies a * sigmoid(b).