#[repr(u8)]pub enum LossReduction {
None = 0,
Mean = 1,
Sum = 2,
}Expand description
Loss reduction mode. Selects the output shape and the final scalar
scaling for a LossKind plan. PyTorch’s reduction parameter.
Variants§
None = 0
Output is per-cell (same shape as the loss surface). No reduction.
Mean = 1
Output is a scalar — sum of per-cell terms divided by element count.
Sum = 2
Output is a scalar — sum of per-cell terms (no divide).
Trait Implementations§
Source§impl Clone for LossReduction
impl Clone for LossReduction
Source§fn clone(&self) -> LossReduction
fn clone(&self) -> LossReduction
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for LossReduction
Source§impl Debug for LossReduction
impl Debug for LossReduction
impl Eq for LossReduction
Source§impl Hash for LossReduction
impl Hash for LossReduction
Source§impl PartialEq for LossReduction
impl PartialEq for LossReduction
Source§fn eq(&self, other: &LossReduction) -> bool
fn eq(&self, other: &LossReduction) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for LossReduction
Auto Trait Implementations§
impl Freeze for LossReduction
impl RefUnwindSafe for LossReduction
impl Send for LossReduction
impl Sync for LossReduction
impl Unpin for LossReduction
impl UnsafeUnpin for LossReduction
impl UnwindSafe for LossReduction
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