Skip to main content

ModuleT

Trait ModuleT 

Source
pub trait ModuleT {
    // Required method
    fn forward_t(&self, xs: &Tensor, train: bool) -> Result<Tensor>;
}
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>

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl<M: Module> ModuleT for M