Skip to content

Instantly share code, notes, and snippets.

@hietalajulius
Created July 28, 2023 12:13
Show Gist options
  • Save hietalajulius/9a7db7048fbe4dfdaa8a14ef57ce23cf to your computer and use it in GitHub Desktop.
Save hietalajulius/9a7db7048fbe4dfdaa8a14ef57ce23cf to your computer and use it in GitHub Desktop.
// Create a mean squared error (MSE) loss function
let mut loss = MSE::new();
// ...
// Compute the loss value using the MSE loss function
let loss_value = loss.forward(&y, &target);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment