pub struct CrossEntropyLoss;
Expand description
Cross-Entropy Loss with softmax
Trait Implementations§
Source§impl LossFunction for CrossEntropyLoss
impl LossFunction for CrossEntropyLoss
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 CrossEntropyLoss
impl RefUnwindSafe for CrossEntropyLoss
impl Send for CrossEntropyLoss
impl Sync for CrossEntropyLoss
impl Unpin for CrossEntropyLoss
impl UnwindSafe for CrossEntropyLoss
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