pub struct EncodeInputs { /* private fields */ }Implementations§
Source§impl EncodeInputs
impl EncodeInputs
pub fn load(vb: VarBuilder<'_>, config: &ESM3Config) -> Result<Self>
Sourcepub fn forward(
&self,
sequence_tokens: Option<&Tensor>,
structure_tokens: Option<&Tensor>,
ss8_tokens: Option<&Tensor>,
sasa_tokens: Option<&Tensor>,
function_tokens: Option<&Tensor>,
residue_annotation_tokens: Option<&Tensor>,
average_plddt: Option<&Tensor>,
per_res_plddt: Option<&Tensor>,
) -> Result<Tensor>
pub fn forward( &self, sequence_tokens: Option<&Tensor>, structure_tokens: Option<&Tensor>, ss8_tokens: Option<&Tensor>, sasa_tokens: Option<&Tensor>, function_tokens: Option<&Tensor>, residue_annotation_tokens: Option<&Tensor>, average_plddt: Option<&Tensor>, per_res_plddt: Option<&Tensor>, ) -> Result<Tensor>
Embed all input tracks and sum them.
All arguments are optional; present tracks contribute their embedding, absent tracks contribute zero.
sequence_tokens:(B, L)u32 sequence token IDs.structure_tokens:(B, L)u32 structure (VQ-VAE) tokens.ss8_tokens:(B, L)u32 secondary-structure tokens.sasa_tokens:(B, L)u32 SASA-bin tokens.function_tokens:(B, L, n_tracks)u32 function annotation tokens.residue_annotation_tokens:(B, L, K)u32 InterPro annotation IDs.average_plddt:(B, L)f32 average per-structure pLDDT in [0,1].per_res_plddt:(B, L)f32 per-residue pLDDT in [0,1].
Returns (B, L, d_model).
Auto Trait Implementations§
impl Freeze for EncodeInputs
impl !RefUnwindSafe for EncodeInputs
impl Send for EncodeInputs
impl Sync for EncodeInputs
impl Unpin for EncodeInputs
impl UnsafeUnpin for EncodeInputs
impl !UnwindSafe for EncodeInputs
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