pub struct RuleBasedMask {
pub batch_size: usize,
pub pattern: RulePattern,
pub rule_spec: String,
}Expand description
Rule-based attention mask
Fields§
§batch_size: usizeBatch size
pattern: RulePatternPattern type
rule_spec: StringRule specification (opaque for now)
Implementations§
Source§impl RuleBasedMask
impl RuleBasedMask
Sourcepub fn new(batch_size: usize, pattern: RulePattern, rule_spec: String) -> Self
pub fn new(batch_size: usize, pattern: RulePattern, rule_spec: String) -> Self
Create a new rule-based mask
Trait Implementations§
Source§impl AttentionMask for RuleBasedMask
impl AttentionMask for RuleBasedMask
Source§impl Clone for RuleBasedMask
impl Clone for RuleBasedMask
Source§fn clone(&self) -> RuleBasedMask
fn clone(&self) -> RuleBasedMask
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 RuleBasedMask
impl RefUnwindSafe for RuleBasedMask
impl Send for RuleBasedMask
impl Sync for RuleBasedMask
impl Unpin for RuleBasedMask
impl UnwindSafe for RuleBasedMask
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