pub struct AtomEncoder { /* private fields */ }Expand description
3-block atom-level transformer encoder.
Maps per-atom features ([B, N_atom, d_atom=128]) to per-token atom
representations ([B, N_tok, d_token=768]) via windowed attention and
token-level pooling.
Implementations§
Source§impl AtomEncoder
impl AtomEncoder
Sourcepub fn load(
vb: VarBuilder<'_>,
d_atom: usize,
d_token: usize,
n_blocks: usize,
) -> Result<Self>
pub fn load( vb: VarBuilder<'_>, d_atom: usize, d_token: usize, n_blocks: usize, ) -> Result<Self>
Load the atom encoder from a VarBuilder rooted at inputs.atom_encoder.*.
§Arguments
vb— builder rooted atinputs.atom_encoderd_atom— per-atom feature dimension (128)d_token— per-token output dimension (768)n_blocks— number of atom transformer blocks (3)
Auto Trait Implementations§
impl Freeze for AtomEncoder
impl RefUnwindSafe for AtomEncoder
impl Send for AtomEncoder
impl Sync for AtomEncoder
impl Unpin for AtomEncoder
impl UnsafeUnpin for AtomEncoder
impl UnwindSafe for AtomEncoder
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