Trait dfdx::nn::BuildModule

source ·
pub trait BuildModule<D: Device<E>, E: Dtype>: Sized + TensorCollection<E, D, To<E, D> = Self> {
    // Provided methods
    fn build(device: &D) -> Self { ... }
    fn try_build(device: &D) -> Result<Self, D::Err> { ... }
}
Expand description

Something that can be built. Related to super::BuildOnDevice

Provided Methods§

source

fn build(device: &D) -> Self

Construct it on the device

source

fn try_build(device: &D) -> Result<Self, D::Err>

Fallible version of BuildModule::build

Implementors§

source§

impl<D: Device<E>, E: Dtype, M: Sized + TensorCollection<E, D, To<E, D> = Self>> BuildModule<D, E> for M