pub struct EncoderOutput<T: FloatBounds> {
pub outputs: Array3<T>,
pub final_hidden: Vec<Array2<T>>,
pub final_cell: Vec<Array2<T>>,
}Expand description
Output of the encoder
Fields§
§outputs: Array3<T>Hidden state at every time step: shape (batch_size, seq_len, hidden_size)
Final hidden state for each RNN layer, used to initialize the decoder
final_cell: Vec<Array2<T>>Final cell state for each RNN layer (LSTM only); empty for GRU
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for EncoderOutput<T>
impl<T> RefUnwindSafe for EncoderOutput<T>where
T: RefUnwindSafe,
impl<T> Send for EncoderOutput<T>
impl<T> Sync for EncoderOutput<T>
impl<T> Unpin for EncoderOutput<T>
impl<T> UnsafeUnpin for EncoderOutput<T>
impl<T> UnwindSafe for EncoderOutput<T>where
T: RefUnwindSafe,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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