pub struct GradientCheckResult {
pub passed: bool,
pub max_relative_error: f64,
pub max_absolute_error: f64,
pub num_elements_checked: usize,
pub num_failures: usize,
pub failed_indices: Vec<usize>,
pub error_message: Option<String>,
}Expand description
Result of gradient checking
Fields§
§passed: boolWhether the gradient check passed
max_relative_error: f64Maximum relative error found
max_absolute_error: f64Maximum absolute error found
num_elements_checked: usizeNumber of elements checked
num_failures: usizeNumber of elements that failed tolerance check
failed_indices: Vec<usize>Indices of failed elements (if check_elementwise is true)
error_message: Option<String>Detailed error message if check failed
Implementations§
Trait Implementations§
Source§impl Clone for GradientCheckResult
impl Clone for GradientCheckResult
Auto Trait Implementations§
impl Freeze for GradientCheckResult
impl RefUnwindSafe for GradientCheckResult
impl Send for GradientCheckResult
impl Sync for GradientCheckResult
impl Unpin for GradientCheckResult
impl UnsafeUnpin for GradientCheckResult
impl UnwindSafe for GradientCheckResult
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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