pub struct DecLayer { /* private fields */ }Implementations§
Source§impl DecLayer
impl DecLayer
Sourcepub fn load(
vb: VarBuilder<'_>,
config: &ProteinMPNNConfig,
layer: i32,
) -> Result<Self>
pub fn load( vb: VarBuilder<'_>, config: &ProteinMPNNConfig, layer: i32, ) -> Result<Self>
The main decoder stack: num_in = 3 * hidden_dim.
Sourcepub fn load_with_num_in(
vb: VarBuilder<'_>,
config: &ProteinMPNNConfig,
layer: i32,
num_in: usize,
) -> Result<Self>
pub fn load_with_num_in( vb: VarBuilder<'_>, config: &ProteinMPNNConfig, layer: i32, num_in: usize, ) -> Result<Self>
num_in explicitly, for LigandMPNN’s context_encoder_layers.
Those are DecLayer(hidden_dim, hidden_dim * 2) in the reference — the
message is [h_V_C, h_E_context, Y_nodes] rather than the decoder’s
three hidden-width blocks — so their W1 is (128, 384) where the
decoder’s is (128, 512) (ferritin-100.11).
pub fn forward( &self, h_v: &Tensor, h_e: &Tensor, mask_v: Option<&Tensor>, mask_attend: Option<&Tensor>, training: Option<bool>, ) -> Result<Tensor>
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for DecLayer
impl !UnwindSafe for DecLayer
impl Freeze for DecLayer
impl Send for DecLayer
impl Sync for DecLayer
impl Unpin for DecLayer
impl UnsafeUnpin for DecLayer
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
§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> ⓘ
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