Trait dfdx::nn::DeviceBuildExt

source ·
pub trait DeviceBuildExt {
    // Provided methods
    fn build_module<M: BuildOnDevice<Self, E>, E: Dtype>(&self) -> M::Built
       where Self: Device<E> { ... }
    fn try_build_module<M: BuildOnDevice<Self, E>, E: Dtype>(
        &self
    ) -> Result<M::Built, Self::Err>
       where Self: Device<E> { ... }
}
Expand description

An extension trait that allows you to build a module with a device method. Also allows easy specification of Dtype.

Provided Methods§

source

fn build_module<M: BuildOnDevice<Self, E>, E: Dtype>(&self) -> M::Builtwhere Self: Device<E>,

source

fn try_build_module<M: BuildOnDevice<Self, E>, E: Dtype>( &self ) -> Result<M::Built, Self::Err>where Self: Device<E>,

Implementors§