Struct leaf::layers::container::sequential::SequentialConfig
[−]
[src]
pub struct SequentialConfig { pub layers: Vec<LayerConfig>, pub inputs: Vec<(String, Vec<usize>)>, pub force_backward: bool, }
Specifies configuration parameters for a Sequential Layer.
Fields
layers | Defines the layers of the container via LayerConfigs. |
inputs | 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 | Defines if the container will force every layer to do backpropagation. If set to Default: |
Methods
impl SequentialConfig
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.
fn add_layer(&mut self, layer: LayerConfig)
Add layer at the end of the sequential container.
fn add_input(&mut self, input_name: &str, shape: &[usize])
Add a input to the network.