pub trait RawModelLayoutMut: RawModelLayout {
// Required methods
fn input_mut(&mut self) -> &mut usize;
fn hidden_mut(&mut self) -> &mut usize;
fn layers_mut(&mut self) -> &mut usize;
fn output_mut(&mut self) -> &mut usize;
// Provided methods
fn set_input(&mut self, input: usize) -> &mut Self { ... }
fn set_hidden(&mut self, hidden: usize) -> &mut Self { ... }
fn set_layers(&mut self, layers: usize) -> &mut Self { ... }
fn set_output(&mut self, output: usize) -> &mut Self { ... }
}Expand description
The RawModelLayoutMut trait defines a mutable interface for objects capable of representing
the layout; i.e. the number of input, hidden, and output features of
Required Methods§
Sourcefn input_mut(&mut self) -> &mut usize
fn input_mut(&mut self) -> &mut usize
returns a mutable reference to number of the input features for the model
returns a mutable reference to the number of hidden features for the model
Sourcefn layers_mut(&mut self) -> &mut usize
fn layers_mut(&mut self) -> &mut usize
returns a mutable reference to the number of hidden layers for the model
Sourcefn output_mut(&mut self) -> &mut usize
fn output_mut(&mut self) -> &mut usize
returns a mutable reference to the output features for the model
Provided Methods§
Sourcefn set_input(&mut self, input: usize) -> &mut Self
fn set_input(&mut self, input: usize) -> &mut Self
update the number of input features for the model and return a mutable reference to the current layout.
update the number of hidden features for the model and return a mutable reference to the current layout.
Sourcefn set_layers(&mut self, layers: usize) -> &mut Self
fn set_layers(&mut self, layers: usize) -> &mut Self
update the number of hidden layers for the model and return a mutable reference to the current layout.
Sourcefn set_output(&mut self, output: usize) -> &mut Self
fn set_output(&mut self, output: usize) -> &mut Self
update the number of output features for the model and return a mutable reference to the current layout.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".