pub struct MAPHeadRecord<B: Backend> {
pub probe: <Param<Tensor<B, 3>> as Module<B>>::Record,
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 norm: <LayerNorm<B> as Module<B>>::Record,
pub mlp: <MlpBlock<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,
}Expand description
The record type for the module.
Fields§
§probe: <Param<Tensor<B, 3>> as Module<B>>::RecordThe module record associative type.
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.
norm: <LayerNorm<B> as Module<B>>::RecordThe module record associative type.
mlp: <MlpBlock<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.
Trait Implementations§
Source§impl<B: Backend> Record<B> for MAPHeadRecord<B>
impl<B: Backend> Record<B> for MAPHeadRecord<B>
Source§type Item<S: PrecisionSettings> = MAPHeadRecordItem<B, S>
type Item<S: PrecisionSettings> = MAPHeadRecordItem<B, S>
Type of the item that can be serialized and deserialized.
Auto Trait Implementations§
impl<B> !Freeze for MAPHeadRecord<B>
impl<B> !RefUnwindSafe for MAPHeadRecord<B>
impl<B> Send for MAPHeadRecord<B>
impl<B> !Sync for MAPHeadRecord<B>
impl<B> Unpin for MAPHeadRecord<B>where
<B as Backend>::FloatTensorPrimitive<3>: Unpin,
<B as Backend>::QuantizedTensorPrimitive<3>: Unpin,
<B as Backend>::Device: Unpin,
<B as Backend>::FloatTensorPrimitive<2>: Unpin,
<B as Backend>::QuantizedTensorPrimitive<2>: Unpin,
<B as Backend>::FloatTensorPrimitive<1>: Unpin,
<B as Backend>::QuantizedTensorPrimitive<1>: Unpin,
impl<B> UnsafeUnpin for MAPHeadRecord<B>where
<B as Backend>::FloatTensorPrimitive<3>: UnsafeUnpin,
<B as Backend>::QuantizedTensorPrimitive<3>: UnsafeUnpin,
<B as Backend>::Device: UnsafeUnpin,
<B as Backend>::FloatTensorPrimitive<2>: UnsafeUnpin,
<B as Backend>::QuantizedTensorPrimitive<2>: UnsafeUnpin,
<B as Backend>::FloatTensorPrimitive<1>: UnsafeUnpin,
<B as Backend>::QuantizedTensorPrimitive<1>: UnsafeUnpin,
impl<B> UnwindSafe for MAPHeadRecord<B>where
<B as Backend>::FloatTensorPrimitive<3>: UnwindSafe,
<B as Backend>::QuantizedTensorPrimitive<3>: UnwindSafe,
<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