pub trait Module<Input> {
    type Output;

    fn forward(&self, input: Input) -> Self::Output;
}
Expand description

Immutable forward of Input that produces Module::Output. See ModuleMut for mutable forward.

Required Associated Types

The type that this unit produces given Input.

Required Methods

Forward Input through the module and produce Module::Output.

See ModuleMut for version that can mutate self.

Example Usage:

let model: Linear<7, 2> = Default::default();
let y1: Tensor1D<2> = model.forward(Tensor1D::zeros());
let y2: Tensor2D<10, 2> = model.forward(Tensor2D::zeros());

Implementations on Foreign Types

Calls forward sequentially on each module in the tuple.

Calls forward sequentially on each module in the tuple.

Calls forward sequentially on each module in the tuple.

Calls forward sequentially on each module in the tuple.

Calls forward sequentially on each module in the tuple.

Implementors