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 of the layer

Implementors§

Source§

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

Source§

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

Source§

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

Source§

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

Source§

impl<F: Float + Debug + ScalarOperand + 'static> ParamLayer<F> for MultiHeadAttention<F>

Source§

impl<F: Float + Debug + ScalarOperand + 'static> ParamLayer<F> for SelfAttention<F>

Source§

impl<F: Float + Debug + ScalarOperand + 'static> ParamLayer<F> for Sequential<F>

Source§

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

Source§

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

Source§

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

Source§

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