[][src]Struct radiate::models::neat::layers::lstm::LSTMState

pub struct LSTMState {
    pub f_gate_output: Vec<Vec<f32>>,
    pub i_gate_output: Vec<Vec<f32>>,
    pub s_gate_output: Vec<Vec<f32>>,
    pub o_gate_output: Vec<Vec<f32>>,
    pub memory_states: Vec<Vec<f32>>,
    pub d_prev_memory: Option<Vec<f32>>,
    pub d_prev_hidden: Option<Vec<f32>>,
}

LSTM State is meant to be a 'snapshot' of the outputs for each gate at each time step. The rest of the time-step memories are held in tracers

Fields

f_gate_output: Vec<Vec<f32>>i_gate_output: Vec<Vec<f32>>s_gate_output: Vec<Vec<f32>>o_gate_output: Vec<Vec<f32>>memory_states: Vec<Vec<f32>>d_prev_memory: Option<Vec<f32>>d_prev_hidden: Option<Vec<f32>>

Methods

impl LSTMState[src]

pub fn new() -> Self[src]

pub fn update_forward(
    &mut self,
    fg: Vec<f32>,
    ig: Vec<f32>,
    sg: Vec<f32>,
    og: Vec<f32>,
    mem_state: Vec<f32>
)
[src]

add the gate outputs to the state for this time step

Trait Implementations

impl Debug for LSTMState[src]

impl<'de> Deserialize<'de> for LSTMState[src]

impl Serialize for LSTMState[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Any for T where
    T: Any + Serialize + Deserialize
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Debug for T where
    T: Debug + Serialize + Deserialize + ?Sized
[src]

impl<T> Deserialize for T where
    T: DeserializeOwned
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> Serialize for T where
    T: Serialize + ?Sized
[src]

impl<T> Serialize for T where
    T: Serialize + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> Type for T[src]

type Meta = Concrete

Type of metadata for type.

impl<T> Type for T where
    T: ?Sized
[src]

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