pub trait AutodiffModule<B: AutodiffBackend>:
Module<B>
+ Send
+ Debug {
type InnerModule: Module<B::InnerBackend>;
// Required methods
fn valid(&self) -> Self::InnerModule;
fn from_inner(module: Self::InnerModule) -> Self;
}Expand description
Module with auto-differentiation backend.
Required Associated Types§
Sourcetype InnerModule: Module<B::InnerBackend>
type InnerModule: Module<B::InnerBackend>
Inner module without auto-differentiation.
Required Methods§
Sourcefn valid(&self) -> Self::InnerModule
fn valid(&self) -> Self::InnerModule
Returns the same module, but on the inner backend without auto-differentiation.
Sourcefn from_inner(module: Self::InnerModule) -> Self
fn from_inner(module: Self::InnerModule) -> Self
Wraps an inner module back into an auto-diff module.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.