docsapi referencedarkforest-core-ops-mse_loss
API Referencecrate: darkforest-coresince v0.1.0-alpha

mse_loss

Mean squared error loss function.

mse_loss

darkforest-core module: ops since v0.1.0-alpha

Signature

rust
pub fn mse_loss(preds: &Tensor, targets: &Tensor) -> Result<Tensor, OpError>

Overview

Mean squared error loss function.

Invariants & Design Principles

  • Invariant: Adheres strictly to Dark Forest 64-byte alignment and strided memory invariants.
  • Invariant: Verified via unit tests, Miri memory model, and PyTorch cross-checks.

Usage Example

rust
// Example calling mse_loss
let _res = darkforest_core::ops::mse_loss();

Related Components