pub struct GradientValidator { /* private fields */ }Expand description
Gradient validation framework
Implementations§
Source§impl GradientValidator
impl GradientValidator
Sourcepub fn set_operation_config(&self, operation: &str, config: GradientCheckConfig)
pub fn set_operation_config(&self, operation: &str, config: GradientCheckConfig)
Set custom configuration for an operation
Sourcepub fn generate_test_cases(&self, operation: &str) -> Vec<GradientTestCase>
pub fn generate_test_cases(&self, operation: &str) -> Vec<GradientTestCase>
Generate test cases for an operation
Sourcepub fn validate_test_case(
&self,
test_case: GradientTestCase,
) -> ValidationResult
pub fn validate_test_case( &self, test_case: GradientTestCase, ) -> ValidationResult
Validate a single test case
Sourcepub fn validate_operation(&self, operation: &str) -> OperationValidationReport
pub fn validate_operation(&self, operation: &str) -> OperationValidationReport
Validate a specific operation
Sourcepub fn validate_all_operations(&self) -> ComprehensiveValidationReport
pub fn validate_all_operations(&self) -> ComprehensiveValidationReport
Validate all operations with gradient implementations
Sourcepub fn set_test_shapes(&mut self, shapes: Vec<Shape>)
pub fn set_test_shapes(&mut self, shapes: Vec<Shape>)
Set test shapes
Sourcepub fn set_test_dtypes(&mut self, dtypes: Vec<DType>)
pub fn set_test_dtypes(&mut self, dtypes: Vec<DType>)
Set test dtypes
Trait Implementations§
Auto Trait Implementations§
impl Freeze for GradientValidator
impl RefUnwindSafe for GradientValidator
impl Send for GradientValidator
impl Sync for GradientValidator
impl Unpin for GradientValidator
impl UnsafeUnpin for GradientValidator
impl UnwindSafe for GradientValidator
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> 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