pub struct Score<A, D>where
D: Dimension,{ /* private fields */ }Expand description
Score is a created as a result of invoking an attention mechanism;
- attention: the actual result; returns the dot product of the score with the value tensor
- score: the attention score tensor
Implementations§
Source§impl<A, D> Score<A, D>where
D: Dimension,
impl<A, D> Score<A, D>where
D: Dimension,
Sourcepub fn into_attention(self) -> Array<A, D>
pub fn into_attention(self) -> Array<A, D>
Consumes the instance and returns the attention tensor.
Sourcepub fn into_score(self) -> Array<A, D>
pub fn into_score(self) -> Array<A, D>
Consumes the container and returns the score tensor.
Trait Implementations§
Source§impl<A, D> From<(ArrayBase<OwnedRepr<A>, D>, ArrayBase<OwnedRepr<A>, D>)> for Score<A, D>where
D: Dimension,
impl<A, D> From<(ArrayBase<OwnedRepr<A>, D>, ArrayBase<OwnedRepr<A>, D>)> for Score<A, D>where
D: Dimension,
impl<A, D> Copy for Score<A, D>
impl<A: Eq, D> Eq for Score<A, D>
impl<A, D> StructuralPartialEq for Score<A, D>where
D: Dimension,
Auto Trait Implementations§
impl<A, D> Freeze for Score<A, D>where
D: Freeze,
impl<A, D> RefUnwindSafe for Score<A, D>where
D: RefUnwindSafe,
A: RefUnwindSafe,
impl<A, D> Send for Score<A, D>where
A: Send,
impl<A, D> Sync for Score<A, D>where
A: Sync,
impl<A, D> Unpin for Score<A, D>where
D: Unpin,
impl<A, D> UnwindSafe for Score<A, D>where
D: UnwindSafe,
A: RefUnwindSafe,
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