pub struct MSELoss;
Expand description
Mean Squared Error loss function
Trait Implementations§
Source§impl LossFunction for MSELoss
impl LossFunction for MSELoss
Source§fn compute_loss(&self, predictions: &Array2<f64>, targets: &Array2<f64>) -> f64
fn compute_loss(&self, predictions: &Array2<f64>, targets: &Array2<f64>) -> f64
Compute the loss between predictions and targets
Source§fn compute_gradient(
&self,
predictions: &Array2<f64>,
targets: &Array2<f64>,
) -> Array2<f64>
fn compute_gradient( &self, predictions: &Array2<f64>, targets: &Array2<f64>, ) -> Array2<f64>
Compute the gradient of the loss with respect to predictions
Auto Trait Implementations§
impl Freeze for MSELoss
impl RefUnwindSafe for MSELoss
impl Send for MSELoss
impl Sync for MSELoss
impl Unpin for MSELoss
impl UnwindSafe for MSELoss
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more