pub struct SelfTuningOptimizer<A: Float, D: Dimension> { /* private fields */ }Expand description
Adaptive optimizer that automatically tunes hyperparameters
Implementations§
Source§impl<A: Float + ScalarOperand + Debug + Send + Sync + 'static + FromPrimitive, D: Dimension + 'static> SelfTuningOptimizer<A, D>
impl<A: Float + ScalarOperand + Debug + Send + Sync + 'static + FromPrimitive, D: Dimension + 'static> SelfTuningOptimizer<A, D>
Sourcepub fn new(config: SelfTuningConfig) -> Result<Self>
pub fn new(config: SelfTuningConfig) -> Result<Self>
Create new self-tuning optimizer
Sourcepub fn add_optimizer_candidate<F>(&mut self, name: String, factory: F)
pub fn add_optimizer_candidate<F>(&mut self, name: String, factory: F)
Add a custom optimizer candidate
Sourcepub fn step(
&mut self,
params: &mut [Array<A, D>],
grads: &[Array<A, D>],
stats: PerformanceStats,
) -> Result<()>
pub fn step( &mut self, params: &mut [Array<A, D>], grads: &[Array<A, D>], stats: PerformanceStats, ) -> Result<()>
Perform optimization step with automatic tuning
Sourcepub fn reset_epoch(&mut self)
pub fn reset_epoch(&mut self)
Reset epoch counters
Sourcepub fn get_optimizer_info(&self) -> OptimizerInfo
pub fn get_optimizer_info(&self) -> OptimizerInfo
Get current optimizer information
Sourcepub fn get_statistics(&self) -> SelfTuningStatistics
pub fn get_statistics(&self) -> SelfTuningStatistics
Get optimization statistics
Auto Trait Implementations§
impl<A, D> Freeze for SelfTuningOptimizer<A, D>
impl<A, D> !RefUnwindSafe for SelfTuningOptimizer<A, D>
impl<A, D> !Send for SelfTuningOptimizer<A, D>
impl<A, D> !Sync for SelfTuningOptimizer<A, D>
impl<A, D> Unpin for SelfTuningOptimizer<A, D>
impl<A, D> !UnwindSafe for SelfTuningOptimizer<A, D>
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> 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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.