Skip to content

Instantly share code, notes, and snippets.

@hietalajulius
Created July 28, 2023 12:33
Show Gist options
  • Save hietalajulius/9035e0ed5e464d38b4a9dd5d3bbdea9b to your computer and use it in GitHub Desktop.
Save hietalajulius/9035e0ed5e464d38b4a9dd5d3bbdea9b to your computer and use it in GitHub Desktop.
/// Perform backward pass through the MSE loss function.
pub fn backward(&self) -> Array2<f64> {
// Return dL/dx obtained from the `self.dL_dx` field
self.dL_dx.clone().expect("Need to call forward() first.")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment