pub struct HyperparameterSpace {
pub learning_rate: (f32, f32),
pub beta1: (f32, f32),
pub beta2: (f32, f32),
pub weight_decay: (f32, f32),
pub epsilon: (f32, f32),
pub batch_sizes: Vec<usize>,
pub log_scale_lr: bool,
pub custom_params: HashMap<String, (f32, f32)>,
}Expand description
Hyperparameter search space definition
Fields§
§learning_rate: (f32, f32)Learning rate bounds (min, max)
beta1: (f32, f32)Beta1 momentum bounds
beta2: (f32, f32)Beta2 momentum bounds
weight_decay: (f32, f32)Weight decay bounds
epsilon: (f32, f32)Epsilon bounds
batch_sizes: Vec<usize>Batch size options (discrete)
log_scale_lr: boolWhether to use logarithmic scaling for learning rate
custom_params: HashMap<String, (f32, f32)>Custom parameter ranges for specific optimizers
Implementations§
Source§impl HyperparameterSpace
impl HyperparameterSpace
Sourcepub fn for_transformers() -> Self
pub fn for_transformers() -> Self
Create search space optimized for transformer models
Sourcepub fn for_vision() -> Self
pub fn for_vision() -> Self
Create search space for vision models
Sourcepub fn for_scientific_computing() -> Self
pub fn for_scientific_computing() -> Self
Create search space for scientific computing
Trait Implementations§
Source§impl Clone for HyperparameterSpace
impl Clone for HyperparameterSpace
Source§fn clone(&self) -> HyperparameterSpace
fn clone(&self) -> HyperparameterSpace
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for HyperparameterSpace
impl Debug for HyperparameterSpace
Source§impl Default for HyperparameterSpace
impl Default for HyperparameterSpace
Source§impl<'de> Deserialize<'de> for HyperparameterSpace
impl<'de> Deserialize<'de> for HyperparameterSpace
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for HyperparameterSpace
impl RefUnwindSafe for HyperparameterSpace
impl Send for HyperparameterSpace
impl Sync for HyperparameterSpace
impl Unpin for HyperparameterSpace
impl UnwindSafe for HyperparameterSpace
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> ConfigSerializable for Twhere
T: Serialize + for<'de> Deserialize<'de>,
impl<T> ConfigSerializable for Twhere
T: Serialize + for<'de> Deserialize<'de>,
Source§fn save_to_file(&self, path: &Path) -> Result<(), TrustformersError>
fn save_to_file(&self, path: &Path) -> Result<(), TrustformersError>
Save to file
Source§fn load_from_file(path: &Path) -> Result<Self, TrustformersError>where
Self: Sized,
fn load_from_file(path: &Path) -> Result<Self, TrustformersError>where
Self: Sized,
Load from file
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