pub struct GradcheckOptions { /* private fields */ }Expand description
gradcheck のアルゴリズム引数。Default は実装しない(閾値を暗黙に決めない)。
フィールドは非公開で、構築は GradcheckOptions::new(有限かつ正を fail-closed 検査)のみ。
Implementations§
Source§impl GradcheckOptions
impl GradcheckOptions
Sourcepub fn new(
eps: f64,
atol: f64,
rtol: f64,
tau: f64,
) -> Result<GradcheckOptions, AutodiffError>
pub fn new( eps: f64, atol: f64, rtol: f64, tau: f64, ) -> Result<GradcheckOptions, AutodiffError>
4 引数すべてが有限かつ正であることを検査して構築する(違反は
Err(InvalidArgument))。eps は中心差分の摂動幅、atol/rtol は絶対・相対の
合格閾値、tau は相対誤差の分母の下限。
Trait Implementations§
Source§impl Clone for GradcheckOptions
impl Clone for GradcheckOptions
Source§fn clone(&self) -> GradcheckOptions
fn clone(&self) -> GradcheckOptions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for GradcheckOptions
Source§impl Debug for GradcheckOptions
impl Debug for GradcheckOptions
Source§impl PartialEq for GradcheckOptions
impl PartialEq for GradcheckOptions
impl StructuralPartialEq for GradcheckOptions
Auto Trait Implementations§
impl Freeze for GradcheckOptions
impl RefUnwindSafe for GradcheckOptions
impl Send for GradcheckOptions
impl Sync for GradcheckOptions
impl Unpin for GradcheckOptions
impl UnsafeUnpin for GradcheckOptions
impl UnwindSafe for GradcheckOptions
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