pub struct GradientTestCase {
pub operation: String,
pub dtype: DType,
pub input_shapes: Vec<Shape>,
pub properties: Vec<GradientProperty>,
pub config: GradientCheckConfig,
}Expand description
Test case for gradient validation
Fields§
§operation: StringOperation being tested
dtype: DTypeData type being tested
input_shapes: Vec<Shape>Input shapes for the test
properties: Vec<GradientProperty>Properties to check
config: GradientCheckConfigConfiguration for numerical checking
Implementations§
Source§impl GradientTestCase
impl GradientTestCase
pub fn new(operation: &str, dtype: DType, input_shapes: Vec<Shape>) -> Self
Sourcepub fn with_property(self, property: GradientProperty) -> Self
pub fn with_property(self, property: GradientProperty) -> Self
Add a property to check
Sourcepub fn with_config(self, config: GradientCheckConfig) -> Self
pub fn with_config(self, config: GradientCheckConfig) -> Self
Set custom configuration
Trait Implementations§
Source§impl Clone for GradientTestCase
impl Clone for GradientTestCase
Auto Trait Implementations§
impl Freeze for GradientTestCase
impl RefUnwindSafe for GradientTestCase
impl Send for GradientTestCase
impl Sync for GradientTestCase
impl Unpin for GradientTestCase
impl UnsafeUnpin for GradientTestCase
impl UnwindSafe for GradientTestCase
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