Skip to main content

ModuleT

Trait ModuleT 

Source
pub trait ModuleT {
    // Required method
    fn forward_t(&self, xs: &Tensor, train: bool) -> Result<Tensor, Error>;
}
Expand description

A single forward method using a single single tensor argument and a flag to separate the training and evaluation behaviors.

Required Methods§

Source

fn forward_t(&self, xs: &Tensor, train: bool) -> Result<Tensor, Error>

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl ModuleT for BatchNorm

Source§

impl ModuleT for Dropout

Source§

impl ModuleT for FuncT<'_>

Source§

impl<M> ModuleT for M
where M: Module,