pub struct NormalizationPresets;Expand description
Common normalization presets for different architectures
Implementations§
Source§impl NormalizationPresets
impl NormalizationPresets
Sourcepub fn resnet_batch_norm(num_features: usize) -> Result<BatchNorm2d>
pub fn resnet_batch_norm(num_features: usize) -> Result<BatchNorm2d>
ResNet-style batch normalization
Sourcepub fn transformer_layer_norm(hidden_size: usize) -> Result<LayerNorm>
pub fn transformer_layer_norm(hidden_size: usize) -> Result<LayerNorm>
Transformer-style layer normalization
Sourcepub fn style_transfer_instance_norm(
num_features: usize,
) -> Result<InstanceNorm2d>
pub fn style_transfer_instance_norm( num_features: usize, ) -> Result<InstanceNorm2d>
Style transfer instance normalization (non-affine)
Sourcepub fn small_batch_group_norm(num_channels: usize) -> Result<GroupNorm>
pub fn small_batch_group_norm(num_channels: usize) -> Result<GroupNorm>
Group normalization for small batch training
Sourcepub fn llama_rms_norm(hidden_size: usize) -> Result<RMSNorm>
pub fn llama_rms_norm(hidden_size: usize) -> Result<RMSNorm>
RMS normalization for LLaMA-style transformers
Sourcepub fn gpt_rms_norm(hidden_size: usize) -> Result<RMSNorm>
pub fn gpt_rms_norm(hidden_size: usize) -> Result<RMSNorm>
RMS normalization for GPT-style models
Auto Trait Implementations§
impl Freeze for NormalizationPresets
impl RefUnwindSafe for NormalizationPresets
impl Send for NormalizationPresets
impl Sync for NormalizationPresets
impl Unpin for NormalizationPresets
impl UnsafeUnpin for NormalizationPresets
impl UnwindSafe for NormalizationPresets
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more