pub enum HeadAggregation {
None,
Mean,
Max,
WeightedMean(Vec<f64>),
Rollout,
}
Expand description
Head aggregation methods
Variants§
None
No aggregation
Mean
Average across heads
Max
Maximum across heads
WeightedMean(Vec<f64>)
Weighted average
Rollout
Attention rollout
Trait Implementations§
Source§impl Clone for HeadAggregation
impl Clone for HeadAggregation
Source§fn clone(&self) -> HeadAggregation
fn clone(&self) -> HeadAggregation
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for HeadAggregation
impl Debug for HeadAggregation
Source§impl PartialEq for HeadAggregation
impl PartialEq for HeadAggregation
Source§impl Serialize for HeadAggregation
impl Serialize for HeadAggregation
impl StructuralPartialEq for HeadAggregation
Auto Trait Implementations§
impl Freeze for HeadAggregation
impl RefUnwindSafe for HeadAggregation
impl Send for HeadAggregation
impl Sync for HeadAggregation
impl Unpin for HeadAggregation
impl UnwindSafe for HeadAggregation
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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