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
Required Methods
sourcefn forward_mut(&mut self, input: Input) -> Self::Output
fn forward_mut(&mut self, input: Input) -> Self::Output
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());