pub struct MultiHeadSelfAttentionRecord<B: Backend> {
pub q_proj: <Linear<B> as Module<B>>::Record,
pub k_proj: <Linear<B> as Module<B>>::Record,
pub v_proj: <Linear<B> as Module<B>>::Record,
pub out_proj: <Linear<B> as Module<B>>::Record,
pub num_heads: <usize as Module<B>>::Record,
pub head_dim: <usize as Module<B>>::Record,
pub scale: <f32 as Module<B>>::Record,
pub chunk_size: <usize as Module<B>>::Record,
pub dropout: <Dropout as Module<B>>::Record,
}Expand description
The record type for the module.
Fields§
§q_proj: <Linear<B> as Module<B>>::RecordThe module record associative type.
k_proj: <Linear<B> as Module<B>>::RecordThe module record associative type.
v_proj: <Linear<B> as Module<B>>::RecordThe module record associative type.
out_proj: <Linear<B> as Module<B>>::RecordThe module record associative type.
num_heads: <usize as Module<B>>::RecordThe module record associative type.
head_dim: <usize as Module<B>>::RecordThe module record associative type.
scale: <f32 as Module<B>>::RecordThe module record associative type.
chunk_size: <usize as Module<B>>::RecordThe module record associative type.
dropout: <Dropout as Module<B>>::RecordThe module record associative type.
Trait Implementations§
Source§impl<B: Backend> Record<B> for MultiHeadSelfAttentionRecord<B>
impl<B: Backend> Record<B> for MultiHeadSelfAttentionRecord<B>
Source§type Item<S: PrecisionSettings> = MultiHeadSelfAttentionRecordItem<B, S>
type Item<S: PrecisionSettings> = MultiHeadSelfAttentionRecordItem<B, S>
Type of the item that can be serialized and deserialized.
Auto Trait Implementations§
impl<B> !Freeze for MultiHeadSelfAttentionRecord<B>
impl<B> !RefUnwindSafe for MultiHeadSelfAttentionRecord<B>
impl<B> Send for MultiHeadSelfAttentionRecord<B>
impl<B> !Sync for MultiHeadSelfAttentionRecord<B>
impl<B> Unpin for MultiHeadSelfAttentionRecord<B>where
<B as Backend>::FloatTensorPrimitive<2>: Unpin,
<B as Backend>::QuantizedTensorPrimitive<2>: Unpin,
<B as Backend>::Device: Unpin,
<B as Backend>::FloatTensorPrimitive<1>: Unpin,
<B as Backend>::QuantizedTensorPrimitive<1>: Unpin,
impl<B> UnsafeUnpin for MultiHeadSelfAttentionRecord<B>where
<B as Backend>::FloatTensorPrimitive<2>: UnsafeUnpin,
<B as Backend>::QuantizedTensorPrimitive<2>: UnsafeUnpin,
<B as Backend>::Device: UnsafeUnpin,
<B as Backend>::FloatTensorPrimitive<1>: UnsafeUnpin,
<B as Backend>::QuantizedTensorPrimitive<1>: UnsafeUnpin,
impl<B> UnwindSafe for MultiHeadSelfAttentionRecord<B>where
<B as Backend>::FloatTensorPrimitive<2>: UnwindSafe,
<B as Backend>::QuantizedTensorPrimitive<2>: UnwindSafe,
<B as Backend>::FloatTensorPrimitive<1>: UnwindSafe,
<B as Backend>::QuantizedTensorPrimitive<1>: 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