pub struct TransformerDecoderLayerRecord<B>where
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: EmptyRecord,
pub norm_first: EmptyRecord,
}Expand description
The record type for the module.
Fields§
§cross_attn: <MultiHeadAttention<B> as Module<B>>::RecordThe module record associative type.
self_attn: <MultiHeadAttention<B> as Module<B>>::RecordThe module record associative type.
pwff: <PositionWiseFeedForward<B> as Module<B>>::RecordThe module record associative type.
norm_1: <LayerNorm<B> as Module<B>>::RecordThe module record associative type.
norm_2: <LayerNorm<B> as Module<B>>::RecordThe module record associative type.
norm_3: <LayerNorm<B> as Module<B>>::RecordThe module record associative type.
dropout: EmptyRecord§norm_first: EmptyRecordTrait Implementations§
Source§impl<B> Record<B> for TransformerDecoderLayerRecord<B>where
B: Backend,
impl<B> Record<B> for TransformerDecoderLayerRecord<B>where
B: Backend,
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.
Source§fn into_item<S>(
self,
) -> <TransformerDecoderLayerRecord<B> as Record<B>>::Item<S>where
S: PrecisionSettings,
fn into_item<S>(
self,
) -> <TransformerDecoderLayerRecord<B> as Record<B>>::Item<S>where
S: PrecisionSettings,
Convert the current record into the corresponding item that follows the given settings.
Source§fn from_item<S>(
item: <TransformerDecoderLayerRecord<B> as Record<B>>::Item<S>,
device: &<B as BackendTypes>::Device,
) -> TransformerDecoderLayerRecord<B>where
S: PrecisionSettings,
fn from_item<S>(
item: <TransformerDecoderLayerRecord<B> as Record<B>>::Item<S>,
device: &<B as BackendTypes>::Device,
) -> TransformerDecoderLayerRecord<B>where
S: PrecisionSettings,
Convert the given item into a record.
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 BackendTypes>::FloatTensorPrimitive: Unpin,
<B as BackendTypes>::QuantizedTensorPrimitive: Unpin,
<B as BackendTypes>::Device: Unpin,
impl<B> UnsafeUnpin for TransformerDecoderLayerRecord<B>where
<B as BackendTypes>::Device: UnsafeUnpin,
<B as BackendTypes>::FloatTensorPrimitive: UnsafeUnpin,
<B as BackendTypes>::QuantizedTensorPrimitive: UnsafeUnpin,
impl<B> !UnwindSafe for TransformerDecoderLayerRecord<B>
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