ParamLayer

Trait ParamLayer 

Source
pub trait ParamLayer<F: Float + Debug + ScalarOperand>: Layer<F> {
    // Required methods
    fn get_parameters(&self) -> Vec<Array<F, IxDyn>> ;
    fn get_gradients(&self) -> Vec<Array<F, IxDyn>> ;
    fn set_parameters(&mut self, params: Vec<Array<F, IxDyn>>) -> Result<()>;
}
Expand description

Trait for layers with parameters (weights, biases)

Required Methods§

Source

fn get_parameters(&self) -> Vec<Array<F, IxDyn>>

Get the parameters of the layer as a vector of arrays

Source

fn get_gradients(&self) -> Vec<Array<F, IxDyn>>

Get the gradients of the parameters

Source

fn set_parameters(&mut self, params: Vec<Array<F, IxDyn>>) -> Result<()>

Set the parameters

Implementors§

Source§

impl<F: Float + Debug + Send + Sync + ScalarOperand + Default> ParamLayer<F> for Conv2D<F>

Source§

impl<F: Float + Debug + ScalarOperand + Send + Sync + 'static> ParamLayer<F> for Dense<F>

Source§

impl<F: Float + Debug + ScalarOperand + Send + Sync + 'static> ParamLayer<F> for BatchNorm<F>

Source§

impl<F: Float + Debug + ScalarOperand + Send + Sync + 'static> ParamLayer<F> for LayerNorm<F>

Source§

impl<F: Float + Debug + ScalarOperand + Send + Sync + 'static> ParamLayer<F> for GRU<F>

Source§

impl<F: Float + Debug + ScalarOperand + Send + Sync + 'static> ParamLayer<F> for LSTM<F>

Source§

impl<F: Float + Debug + ScalarOperand + Send + Sync + 'static> ParamLayer<F> for RNN<F>