pub struct PairInit { /* private fields */ }Expand description
Learnable pair-representation initializer.
Combines relative-position + chain features and an outer-product term to
produce the initial [B, N, N, d_pair] tensor fed into the Pairformer.
Implementations§
Source§impl PairInit
impl PairInit
Sourcepub fn load(
vb: VarBuilder<'_>,
d_single: usize,
d_pair: usize,
n_relpos_bins: usize,
d_outer: usize,
) -> Result<Self>
pub fn load( vb: VarBuilder<'_>, d_single: usize, d_pair: usize, n_relpos_bins: usize, d_outer: usize, ) -> Result<Self>
Load from a VarBuilder rooted at pair_init.*.
§Arguments
d_single— single-repr dim (384)d_pair— output pair dim (256)n_relpos_bins— half-window for relpos (32 → 65 bins)d_outer— inner dim for outer-product projection (32)
Auto Trait Implementations§
impl Freeze for PairInit
impl !RefUnwindSafe for PairInit
impl Send for PairInit
impl Sync for PairInit
impl Unpin for PairInit
impl UnsafeUnpin for PairInit
impl !UnwindSafe for PairInit
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<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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