pub enum OptimizerError {
InvalidHyperparameter {
name: String,
message: String,
},
Diverged {
iteration: usize,
message: String,
},
ConvergenceFailure {
max_iterations: usize,
},
DimensionMismatch {
params: usize,
gradients: usize,
},
LineSearchFailure {
message: String,
},
NumericalInstability {
message: String,
},
}Expand description
Errors that can occur during optimization.
Variants§
InvalidHyperparameter
Invalid hyperparameter value
Diverged
Optimization diverged (NaN or Inf encountered)
ConvergenceFailure
Failed to converge within max iterations
DimensionMismatch
Dimension mismatch between parameters and gradients
LineSearchFailure
Line search failed
NumericalInstability
Numerical instability detected
Trait Implementations§
Source§impl Debug for OptimizerError
impl Debug for OptimizerError
Source§impl Display for OptimizerError
impl Display for OptimizerError
Source§impl Error for OptimizerError
impl Error for OptimizerError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for OptimizerError
impl RefUnwindSafe for OptimizerError
impl Send for OptimizerError
impl Sync for OptimizerError
impl Unpin for OptimizerError
impl UnwindSafe for OptimizerError
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