mlx_rs

Function stop_gradient

Source
pub fn stop_gradient(a: impl AsRef<Array>) -> Result<Array>
Expand description

Stop gradients from being computed.

The operation is the identity but it prevents gradients from flowing through the array.