Struct PeepholeLSTMCell

Source
pub struct PeepholeLSTMCell {
Show 15 fields pub w_xi: Array2<f64>, pub w_hi: Array2<f64>, pub b_i: Array2<f64>, pub w_ci: Array2<f64>, pub w_xf: Array2<f64>, pub w_hf: Array2<f64>, pub b_f: Array2<f64>, pub w_cf: Array2<f64>, pub w_xc: Array2<f64>, pub w_hc: Array2<f64>, pub b_c: Array2<f64>, pub w_xo: Array2<f64>, pub w_ho: Array2<f64>, pub b_o: Array2<f64>, pub w_co: Array2<f64>,
}
Expand description

Peephole LSTM cell with direct connections from cell state to gates

Fields§

§w_xi: Array2<f64>§w_hi: Array2<f64>§b_i: Array2<f64>§w_ci: Array2<f64>§w_xf: Array2<f64>§w_hf: Array2<f64>§b_f: Array2<f64>§w_cf: Array2<f64>§w_xc: Array2<f64>§w_hc: Array2<f64>§b_c: Array2<f64>§w_xo: Array2<f64>§w_ho: Array2<f64>§b_o: Array2<f64>§w_co: Array2<f64>

Implementations§

Source§

impl PeepholeLSTMCell

Source

pub fn new(input_size: usize, hidden_size: usize) -> Self

Create new peephole LSTM cell with Gaussian weight initialization

Source

pub fn forward( &self, input: &Array2<f64>, h_prev: &Array2<f64>, c_prev: &Array2<f64>, ) -> (Array2<f64>, Array2<f64>)

Forward pass implementing peephole LSTM equations

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V