pub struct LSTM { /* private fields */ }Expand description
LSTM Layer - processes entire sequences
Implementations§
Source§impl LSTM
impl LSTM
Sourcepub fn new(
input_size: usize,
hidden_size: usize,
num_layers: usize,
bidirectional: bool,
dropout: f32,
) -> Self
pub fn new( input_size: usize, hidden_size: usize, num_layers: usize, bidirectional: bool, dropout: f32, ) -> Self
Create a new LSTM layer
§Arguments
input_size- Size of input featureshidden_size- Size of hidden statenum_layers- Number of stacked LSTM layersbidirectional- Whether to use bidirectional LSTMdropout- Dropout probability between layers
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LSTM
impl !RefUnwindSafe for LSTM
impl Send for LSTM
impl Sync for LSTM
impl Unpin for LSTM
impl !UnwindSafe for LSTM
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more