#[non_exhaustive]pub enum NormKind {
Layer,
Rms,
}Expand description
Normalization computed by an ErasedNormPlan.
§Examples
use strided_basic::NormKind;
assert_ne!(NormKind::Layer, NormKind::Rms);Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Layer
y = (x - mean) / sqrt(var + eps) with the biased (population)
variance var = mean((x - mean)^2).
Rms
y = x / sqrt(mean(x^2) + eps).
Trait Implementations§
impl Copy for NormKind
impl Eq for NormKind
impl StructuralPartialEq for NormKind
Auto Trait Implementations§
impl Freeze for NormKind
impl RefUnwindSafe for NormKind
impl Send for NormKind
impl Sync for NormKind
impl Unpin for NormKind
impl UnsafeUnpin for NormKind
impl UnwindSafe for NormKind
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