pub trait ModelLayout: Copy + Debug {
Show 19 methods
// Required methods
fn input(&self) -> usize;
fn input_mut(&mut self) -> &mut usize;
fn hidden(&self) -> usize;
fn hidden_mut(&mut self) -> &mut usize;
fn layers(&self) -> usize;
fn layers_mut(&mut self) -> &mut usize;
fn output(&self) -> 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 { ... }
fn dim_input(&self) -> (usize, usize) { ... }
fn dim_hidden(&self) -> (usize, usize) { ... }
fn dim_output(&self) -> (usize, usize) { ... }
fn size(&self) -> usize { ... }
fn size_input(&self) -> usize { ... }
fn size_hidden(&self) -> usize { ... }
fn size_output(&self) -> usize { ... }
}Required Methods§
Sourcefn input_mut(&mut self) -> &mut usize
fn input_mut(&mut self) -> &mut usize
returns a mutable reference to the input features for the model
returns a copy of the hidden features for the model
returns a mutable reference to the 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§
sets the hidden features for the model
Sourcefn set_layers(&mut self, layers: usize) -> &mut Self
fn set_layers(&mut self, layers: usize) -> &mut Self
sets the number of hidden layers for the model
Sourcefn set_output(&mut self, output: usize) -> &mut Self
fn set_output(&mut self, output: usize) -> &mut Self
sets the output features for the model
the dimension of the hidden layers; (hidden, hidden)
Sourcefn dim_output(&self) -> (usize, usize)
fn dim_output(&self) -> (usize, usize)
the dimension of the output layer; (hidden, output)
Sourcefn size_input(&self) -> usize
fn size_input(&self) -> usize
the total number of input parameters in the model
the total number of hidden parameters in the model
Sourcefn size_output(&self) -> usize
fn size_output(&self) -> usize
the total number of output parameters in the model
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.