pub trait ModuleMut<Input> {
    type Output;

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

Mutable forward of Input that produces ModuleMut::Output. See Module for immutable forward.

Required Associated Types

The type that this unit produces given Input.

Required Methods

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

See Module::forward() for immutable version

Example Usage:

let mut model: Linear<7, 2> = Default::default();
let y1: Tensor1D<2> = model.forward_mut(Tensor1D::zeros());
let y2: Tensor2D<10, 2> = model.forward_mut(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