pub enum Loss {
Mse,
Mae,
BinaryCrossEntropyWithLogits,
SoftmaxCrossEntropy,
}Expand description
Supported loss functions.
Variants§
Mse
Mean squared error.
Mae
Mean absolute error.
BinaryCrossEntropyWithLogits
Binary cross-entropy with logits.
This expects raw logits as predictions and targets in [0, 1].
In most cases you should use an Identity activation on the output layer.
SoftmaxCrossEntropy
Softmax cross-entropy.
This expects raw logits as predictions and a one-hot target vector.
In most cases you should use an Identity activation on the output layer.
Implementations§
Trait Implementations§
impl Copy for Loss
impl Eq for Loss
impl StructuralPartialEq for Loss
Auto Trait Implementations§
impl Freeze for Loss
impl RefUnwindSafe for Loss
impl Send for Loss
impl Sync for Loss
impl Unpin for Loss
impl UnwindSafe for Loss
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