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 false, then the execution of backpropagation is determined automatically according to the network structure and learning rates.

Default: false

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.

Trait Implementations

impl Into<LayerType> for SequentialConfig

fn into(self) -> LayerType

impl Default for SequentialConfig

fn default() -> SequentialConfig

Derived Implementations

impl Clone for SequentialConfig

fn clone(&self) -> SequentialConfig

1.0.0fn clone_from(&mut self, source: &Self)

impl Debug for SequentialConfig

fn fmt(&self, __arg_0: &mut Formatter) -> Result