Struct juice::layer::LayerConfig
source · 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>,
}
Expand description
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.
Implementations§
source§impl LayerConfig
impl LayerConfig
sourcepub fn new<L: Into<LayerType>>(name: &str, layer_type: L) -> LayerConfig
pub fn new<L: Into<LayerType>>(name: &str, layer_type: L) -> LayerConfig
Creates a new LayerConfig
sourcepub fn output(&self, output_id: usize) -> Option<&String>
pub fn output(&self, output_id: usize) -> Option<&String>
Returns the Name of the requested output Blob
sourcepub fn outputs_len(&self) -> usize
pub fn outputs_len(&self) -> usize
Returns the number of output Blobs
sourcepub fn add_output(&mut self, output_name: &str)
pub fn add_output(&mut self, output_name: &str)
Add a output by name
sourcepub fn input(&self, input_id: usize) -> Option<&String>
pub fn input(&self, input_id: usize) -> Option<&String>
Returns the Name of the requested input Blob
sourcepub fn inputs_len(&self) -> usize
pub fn inputs_len(&self) -> usize
Returns the number of input Blobs
sourcepub fn param(&self, param_id: usize) -> Option<&WeightConfig>
pub fn param(&self, param_id: usize) -> Option<&WeightConfig>
Returns the requested WeightConfig
sourcepub fn params_len(&self) -> usize
pub fn params_len(&self) -> usize
Returns the number of params
Trait Implementations§
source§impl Clone for LayerConfig
impl Clone for LayerConfig
source§fn clone(&self) -> LayerConfig
fn clone(&self) -> LayerConfig
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 moreAuto Trait Implementations§
impl RefUnwindSafe for LayerConfig
impl Send for LayerConfig
impl Sync for LayerConfig
impl Unpin for LayerConfig
impl UnwindSafe for LayerConfig
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