pub struct TransformerDecoderLayerRecord<B: Backend> {
pub cross_attn: <MultiHeadAttention<B> as Module<B>>::Record,
pub self_attn: <MultiHeadAttention<B> as Module<B>>::Record,
pub pwff: <PositionWiseFeedForward<B> as Module<B>>::Record,
pub norm_1: <LayerNorm<B> as Module<B>>::Record,
pub norm_2: <LayerNorm<B> as Module<B>>::Record,
pub norm_3: <LayerNorm<B> as Module<B>>::Record,
pub dropout: <Dropout as Module<B>>::Record,
pub norm_first: <bool as Module<B>>::Record,
}
Expand description
The record type for the module.
Fields§
§cross_attn: <MultiHeadAttention<B> as Module<B>>::Record
The module record associative type.
self_attn: <MultiHeadAttention<B> as Module<B>>::Record
The module record associative type.
pwff: <PositionWiseFeedForward<B> as Module<B>>::Record
The module record associative type.
norm_1: <LayerNorm<B> as Module<B>>::Record
The module record associative type.
norm_2: <LayerNorm<B> as Module<B>>::Record
The module record associative type.
norm_3: <LayerNorm<B> as Module<B>>::Record
The module record associative type.
dropout: <Dropout as Module<B>>::Record
The module record associative type.
norm_first: <bool as Module<B>>::Record
The module record associative type.
Trait Implementations§
Source§impl<B: Backend> Record<B> for TransformerDecoderLayerRecord<B>
impl<B: Backend> Record<B> for TransformerDecoderLayerRecord<B>
Source§type Item<S: PrecisionSettings> = TransformerDecoderLayerRecordItem<B, S>
type Item<S: PrecisionSettings> = TransformerDecoderLayerRecordItem<B, S>
Type of the item that can be serialized and deserialized.
Auto Trait Implementations§
impl<B> !Freeze for TransformerDecoderLayerRecord<B>
impl<B> !RefUnwindSafe for TransformerDecoderLayerRecord<B>
impl<B> Send for TransformerDecoderLayerRecord<B>
impl<B> !Sync for TransformerDecoderLayerRecord<B>
impl<B> Unpin for TransformerDecoderLayerRecord<B>where
<B as Backend>::FloatTensorPrimitive: Unpin,
<B as Backend>::QuantizedTensorPrimitive: Unpin,
<B as Backend>::Device: Unpin,
impl<B> UnwindSafe for TransformerDecoderLayerRecord<B>where
<B as Backend>::FloatTensorPrimitive: UnwindSafe,
<B as Backend>::QuantizedTensorPrimitive: UnwindSafe,
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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