Trait zyx::module::Module

source ·
pub trait Module<'p, Input> {
    type Output;
    type Params: Parameters;

    fn forward(&'p self, x: Input) -> Self::Output;
    fn parameters(&'p mut self) -> Self::Params;
}
Expand description

Module trait

Module can be implemented for anything that can have forward function. Forward simply takes any input, applies some operation and returns output. Every module also has some or zero parameters that can be optimized by optimizers.

Required Associated Types

Output of forward operation on Module

Required Methods

Forward operation on Module

Get parameters of Module

Implementations on Foreign Types

Implementors