Realm

oa::ml::optim::ParameterGroup

A named parameter group for differential optimizer treatment. Groups are construction-time configuration: lr_scale multiplies the optimizer’s base learning rate for member parameters, weight_decay replaces the optimizer-level decay when present (Some(0.0) is the decay exclusion), and frozen parameters keep both their values and their optimizer moments untouched across updates. The name is diagnostic; it participates in validation errors. Group membership must be disjoint and cover the optimizer’s whole parameter set.

StRust public API

Declaration

pub struct ParameterGroup { pub name: String, pub parameters: Vec<Parameter>, pub lr_scale: f32, pub weight_decay: Option<f32>, pub frozen: bool, }
Public Rust declaration.

Public Methods

pub fn with_lr_scale(self, lr_scale: f32) -> Self
pub fn with_weight_decay(self, weight_decay: f32) -> Self
pub fn frozen(self) -> Self
fn clone(&self) -> ParameterGroup

Associated Functions

pub fn new(name: impl Into<String>, parameters: Vec<Parameter>) -> Self

Public Data Members

nameStringfield
parametersVec<Parameter>field
lr_scalef32field
weight_decayOption<f32>field
frozenboolfield

Public Method Documentation

pub fn with_lr_scale( self, lr_scale: f32 ) -> Self
No public source comment is attached to this declaration.
pub fn with_weight_decay( self, weight_decay: f32 ) -> Self
No public source comment is attached to this declaration.
pub fn frozen( self ) -> Self
No public source comment is attached to this declaration.
fn clone( &self ) -> ParameterGroup
No public source comment is attached to this declaration.
pub fn new( name: impl Into<String>, parameters: Vec<Parameter> ) -> Self
No public source comment is attached to this declaration.