pub enum AttentionError {
DimensionMismatch {
expected: usize,
actual: usize,
},
InvalidConfig(String),
ComputationError(String),
MemoryError(String),
InvalidHeadCount {
dim: usize,
num_heads: usize,
},
EmptyInput(String),
InvalidEdges(String),
NumericalInstability(String),
InvalidMask {
expected: String,
actual: String,
},
}Expand description
Errors that can occur during attention operations.
Variants§
DimensionMismatch
Dimension mismatch between query, key, or value tensors.
InvalidConfig(String)
Invalid configuration parameter.
ComputationError(String)
Error during attention computation.
MemoryError(String)
Memory allocation failure.
InvalidHeadCount
Invalid head configuration for multi-head attention.
EmptyInput(String)
Empty input provided.
InvalidEdges(String)
Invalid edge configuration for graph attention.
NumericalInstability(String)
Numerical instability detected.
InvalidMask
Invalid mask dimensions.
Trait Implementations§
Source§impl Clone for AttentionError
impl Clone for AttentionError
Source§fn clone(&self) -> AttentionError
fn clone(&self) -> AttentionError
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 moreSource§impl Debug for AttentionError
impl Debug for AttentionError
Source§impl Display for AttentionError
impl Display for AttentionError
Source§impl Error for AttentionError
impl Error for AttentionError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for AttentionError
impl RefUnwindSafe for AttentionError
impl Send for AttentionError
impl Sync for AttentionError
impl Unpin for AttentionError
impl UnwindSafe for AttentionError
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