pub struct MultiHeadAttention {
pub heads: usize,
pub d_model: usize,
pub d_k: usize,
pub w_q: Tensor,
pub w_k: Tensor,
pub w_v: Tensor,
pub w_o: Tensor,
}Fields§
§heads: usize§d_model: usize§d_k: usize§w_q: Tensor§w_k: Tensor§w_v: Tensor§w_o: TensorImplementations§
Trait Implementations§
Source§impl Clone for MultiHeadAttention
impl Clone for MultiHeadAttention
Source§fn clone(&self) -> MultiHeadAttention
fn clone(&self) -> MultiHeadAttention
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for MultiHeadAttention
impl RefUnwindSafe for MultiHeadAttention
impl Send for MultiHeadAttention
impl Sync for MultiHeadAttention
impl Unpin for MultiHeadAttention
impl UnsafeUnpin for MultiHeadAttention
impl UnwindSafe for MultiHeadAttention
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