Struct juice::layers::container::sequential::SequentialConfig
source · pub struct SequentialConfig {
pub layers: Vec<LayerConfig>,
pub inputs: Vec<(String, Vec<usize>)>,
pub force_backward: bool,
}
Expand description
Specifies configuration parameters for a Sequential Layer.
Fields§
§layers: Vec<LayerConfig>
Defines the layers of the container via LayerConfigs.
inputs: Vec<(String, Vec<usize>)>
Defines the names and shapes of the input tensors.
The inputs are identified by name so they can be referenced as input tensors in a LayerConfig.
force_backward: bool
Defines if the container will force every layer to do [backpropagation][1]. [1]: https://en.wikipedia.org/wiki/Backpropagation
If set to false
, then the execution of backpropagation is determined automatically
according to the network structure and learning rates.
Default: false
Implementations§
source§impl SequentialConfig
impl SequentialConfig
sourcepub fn find_in_place_output(&self, n: usize) -> Option<String>
pub fn find_in_place_output(&self, n: usize) -> Option<String>
Tries to find the output of a previous layer that is usable as in-place output for the n-th layer.
sourcepub fn add_layer(&mut self, layer: LayerConfig)
pub fn add_layer(&mut self, layer: LayerConfig)
Add layer at the end of the sequential container.
Trait Implementations§
source§impl Clone for SequentialConfig
impl Clone for SequentialConfig
source§fn clone(&self) -> SequentialConfig
fn clone(&self) -> SequentialConfig
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for SequentialConfig
impl Debug for SequentialConfig
source§impl Default for SequentialConfig
impl Default for SequentialConfig
source§fn default() -> SequentialConfig
fn default() -> SequentialConfig
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl RefUnwindSafe for SequentialConfig
impl Send for SequentialConfig
impl Sync for SequentialConfig
impl Unpin for SequentialConfig
impl UnwindSafe for SequentialConfig
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more