pub struct GradCheckConfig {
pub epsilon: f64,
pub rel_tolerance: f64,
pub abs_tolerance: f64,
pub verbose: bool,
pub max_errors_to_report: usize,
}Expand description
Configuration for gradient checking
Fields§
§epsilon: f64Epsilon for numerical differentiation
rel_tolerance: f64Relative tolerance for comparing gradients
abs_tolerance: f64Absolute tolerance for comparing gradients
verbose: boolWhether to print detailed errors
max_errors_to_report: usizeMaximum number of errors to report
Implementations§
Source§impl GradCheckConfig
impl GradCheckConfig
Sourcepub fn with_verbose(self, verbose: bool) -> Self
pub fn with_verbose(self, verbose: bool) -> Self
Enable verbose error reporting
Sourcepub fn with_epsilon(self, epsilon: f64) -> Self
pub fn with_epsilon(self, epsilon: f64) -> Self
Set epsilon for numerical differentiation
Sourcepub fn with_rel_tolerance(self, tolerance: f64) -> Self
pub fn with_rel_tolerance(self, tolerance: f64) -> Self
Set relative tolerance
Sourcepub fn with_abs_tolerance(self, tolerance: f64) -> Self
pub fn with_abs_tolerance(self, tolerance: f64) -> Self
Set absolute tolerance
Trait Implementations§
Source§impl Clone for GradCheckConfig
impl Clone for GradCheckConfig
Source§fn clone(&self) -> GradCheckConfig
fn clone(&self) -> GradCheckConfig
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 GradCheckConfig
impl Debug for GradCheckConfig
Auto Trait Implementations§
impl Freeze for GradCheckConfig
impl RefUnwindSafe for GradCheckConfig
impl Send for GradCheckConfig
impl Sync for GradCheckConfig
impl Unpin for GradCheckConfig
impl UnwindSafe for GradCheckConfig
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