Skip to main content

AutodiffModule

Trait AutodiffModule 

Source
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§

Source

type InnerModule: Module<B::InnerBackend>

Inner module without auto-differentiation.

Required Methods§

Source

fn valid(&self) -> Self::InnerModule

Returns the same module, but on the inner backend without auto-differentiation.

Source

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".

Implementations on Foreign Types§

Source§

impl<B, L0, L1, L2, L3, L4, L5, L6, L7, L8, L9> AutodiffModule<B> for (L0, L1, L2, L3, L4, L5, L6, L7, L8, L9)

Source§

impl<B, L0, L1, L2, L3, L4, L5, L6, L7, L8> AutodiffModule<B> for (L0, L1, L2, L3, L4, L5, L6, L7, L8)

Source§

impl<B, L0, L1, L2, L3, L4, L5, L6, L7> AutodiffModule<B> for (L0, L1, L2, L3, L4, L5, L6, L7)

Source§

impl<B, L0, L1, L2, L3, L4, L5, L6> AutodiffModule<B> for (L0, L1, L2, L3, L4, L5, L6)

Source§

impl<B, L0, L1, L2, L3, L4, L5> AutodiffModule<B> for (L0, L1, L2, L3, L4, L5)

Source§

impl<B, L0, L1, L2, L3, L4> AutodiffModule<B> for (L0, L1, L2, L3, L4)

Source§

impl<B, L0, L1, L2, L3> AutodiffModule<B> for (L0, L1, L2, L3)

Source§

type InnerModule = (<L0 as AutodiffModule<B>>::InnerModule, <L1 as AutodiffModule<B>>::InnerModule, <L2 as AutodiffModule<B>>::InnerModule, <L3 as AutodiffModule<B>>::InnerModule)

Source§

fn valid(&self) -> Self::InnerModule

Source§

fn from_inner(module: Self::InnerModule) -> Self

Source§

impl<B, L0, L1, L2> AutodiffModule<B> for (L0, L1, L2)

Source§

type InnerModule = (<L0 as AutodiffModule<B>>::InnerModule, <L1 as AutodiffModule<B>>::InnerModule, <L2 as AutodiffModule<B>>::InnerModule)

Source§

fn valid(&self) -> Self::InnerModule

Source§

fn from_inner(module: Self::InnerModule) -> Self

Source§

impl<B, L0, L1> AutodiffModule<B> for (L0, L1)

Source§

type InnerModule = (<L0 as AutodiffModule<B>>::InnerModule, <L1 as AutodiffModule<B>>::InnerModule)

Source§

fn valid(&self) -> Self::InnerModule

Source§

fn from_inner(module: Self::InnerModule) -> Self

Source§

impl<B: AutodiffBackend> AutodiffModule<B> for PhantomData<B>

Source§

impl<B: AutodiffBackend> AutodiffModule<B> for String

Source§

type InnerModule = String

Source§

fn valid(&self) -> Self::InnerModule

Source§

fn from_inner(module: Self::InnerModule) -> Self

Source§

impl<B: AutodiffBackend> AutodiffModule<B> for bool

Source§

type InnerModule = bool

Source§

fn valid(&self) -> Self::InnerModule

Source§

fn from_inner(module: Self::InnerModule) -> Self

Source§

impl<B: AutodiffBackend> AutodiffModule<B> for f32

Source§

type InnerModule = f32

Source§

fn valid(&self) -> Self::InnerModule

Source§

fn from_inner(module: Self::InnerModule) -> Self

Source§

impl<B: AutodiffBackend> AutodiffModule<B> for f64

Source§

type InnerModule = f64

Source§

fn valid(&self) -> Self::InnerModule

Source§

fn from_inner(module: Self::InnerModule) -> Self

Source§

impl<B: AutodiffBackend> AutodiffModule<B> for i8

Source§

type InnerModule = i8

Source§

fn valid(&self) -> Self::InnerModule

Source§

fn from_inner(module: Self::InnerModule) -> Self

Source§

impl<B: AutodiffBackend> AutodiffModule<B> for i16

Source§

type InnerModule = i16

Source§

fn valid(&self) -> Self::InnerModule

Source§

fn from_inner(module: Self::InnerModule) -> Self

Source§

impl<B: AutodiffBackend> AutodiffModule<B> for i32

Source§

type InnerModule = i32

Source§

fn valid(&self) -> Self::InnerModule

Source§

fn from_inner(module: Self::InnerModule) -> Self

Source§

impl<B: AutodiffBackend> AutodiffModule<B> for i64

Source§

type InnerModule = i64

Source§

fn valid(&self) -> Self::InnerModule

Source§

fn from_inner(module: Self::InnerModule) -> Self

Source§

impl<B: AutodiffBackend> AutodiffModule<B> for isize

Source§

type InnerModule = isize

Source§

fn valid(&self) -> Self::InnerModule

Source§

fn from_inner(module: Self::InnerModule) -> Self

Source§

impl<B: AutodiffBackend> AutodiffModule<B> for u8

Source§

type InnerModule = u8

Source§

fn valid(&self) -> Self::InnerModule

Source§

fn from_inner(module: Self::InnerModule) -> Self

Source§

impl<B: AutodiffBackend> AutodiffModule<B> for u16

Source§

type InnerModule = u16

Source§

fn valid(&self) -> Self::InnerModule

Source§

fn from_inner(module: Self::InnerModule) -> Self

Source§

impl<B: AutodiffBackend> AutodiffModule<B> for u32

Source§

type InnerModule = u32

Source§

fn valid(&self) -> Self::InnerModule

Source§

fn from_inner(module: Self::InnerModule) -> Self

Source§

impl<B: AutodiffBackend> AutodiffModule<B> for u64

Source§

type InnerModule = u64

Source§

fn valid(&self) -> Self::InnerModule

Source§

fn from_inner(module: Self::InnerModule) -> Self

Source§

impl<B: AutodiffBackend> AutodiffModule<B> for usize

Source§

type InnerModule = usize

Source§

fn valid(&self) -> Self::InnerModule

Source§

fn from_inner(module: Self::InnerModule) -> Self

Source§

impl<T, B> AutodiffModule<B> for Option<T>

Source§

type InnerModule = Option<<T as AutodiffModule<B>>::InnerModule>

Source§

fn valid(&self) -> Self::InnerModule

Source§

fn from_inner(module: Self::InnerModule) -> Self

Source§

impl<T, B> AutodiffModule<B> for Vec<T>

Source§

type InnerModule = Vec<<T as AutodiffModule<B>>::InnerModule>

Source§

fn valid(&self) -> Self::InnerModule

Source§

fn from_inner(module: Self::InnerModule) -> Self

Source§

impl<const N: usize, T, B> AutodiffModule<B> for [T; N]

Source§

type InnerModule = [<T as AutodiffModule<B>>::InnerModule; N]

Source§

fn valid(&self) -> Self::InnerModule

Source§

fn from_inner(module: Self::InnerModule) -> Self

Implementors§