pub struct EncoderLayer { /* private fields */ }Implementations§
Source§impl EncoderLayer
impl EncoderLayer
pub fn new() -> Self
Sourcepub fn attention(&self) -> &MultiHeadAttention
pub fn attention(&self) -> &MultiHeadAttention
Returns an immutable reference to the multi-head, self-attention layer.
Sourcepub fn attention_mut(&mut self) -> &mut MultiHeadAttention
pub fn attention_mut(&mut self) -> &mut MultiHeadAttention
Returns a mutable reference to the multi-head, self-attention layer.
Trait Implementations§
Source§impl Default for EncoderLayer
impl Default for EncoderLayer
Source§fn default() -> EncoderLayer
fn default() -> EncoderLayer
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for EncoderLayer
impl RefUnwindSafe for EncoderLayer
impl Send for EncoderLayer
impl Sync for EncoderLayer
impl Unpin for EncoderLayer
impl UnwindSafe for EncoderLayer
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