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 | The name of the Layer |
layer_type | The type of the Layer |
outputs | The name for each output Blob |
inputs | The name for each input Blob |
params | Specifies training configuration for each weight blob. |
propagate_down | 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
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.