Struct leaf::layer::LayerConfig
[−]
[src]
pub struct LayerConfig { pub name: String, pub layer_type: LayerType, pub outputs: Vec<String>, pub inputs: Vec<String>, pub params: Vec<WeightConfig>, pub propagate_down: Vec<bool>, }
Layer Configuration Struct
Fields
name: String
The name of the Layer
layer_type: LayerType
The type of the Layer
outputs: Vec<String>
The name for each output Blob
inputs: Vec<String>
The name for each input Blob
params: Vec<WeightConfig>
Specifies training configuration for each weight blob.
propagate_down: Vec<bool>
Specifies on which inputs the backpropagation should be skipped. The size must be either 0 or equal to the number of inputs.
Methods
impl LayerConfig
[src]
fn new<L: Into<LayerType>>(name: &str, layer_type: L) -> LayerConfig
Creates a new LayerConfig
fn output(&self, output_id: usize) -> Option<&String>
Returns the Name of the requested output Blob
fn outputs_len(&self) -> usize
Returns the number of output Blobs
fn add_output(&mut self, output_name: &str)
Add a output by name
fn input(&self, input_id: usize) -> Option<&String>
Returns the Name of the requested input Blob
fn inputs_len(&self) -> usize
Returns the number of input Blobs
fn add_input(&mut self, input_name: &str)
Add a input by name
fn param(&self, param_id: usize) -> Option<&WeightConfig>
Returns the requested WeightConfig
fn params_len(&self) -> usize
Returns the number of params
fn validate(&self) -> Result<(), &'static str>
Check if the configured parameters make sense.
Trait Implementations
impl Debug for LayerConfig
[src]
impl Clone for LayerConfig
[src]
fn clone(&self) -> LayerConfig
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more