pub enum TrustformerError {
InvalidDimension {
expected: usize,
got: usize,
context: String,
},
InvalidHeadCount {
d_model: usize,
n_heads: usize,
},
InvalidMaskShape {
expected: Vec<usize>,
got: Vec<usize>,
},
MissingParameter(String),
CompilationError(String),
CheckpointLoadError(String),
}Expand description
Errors that can occur in transformer operations.
Variants§
InvalidDimension
Invalid dimension configuration
InvalidHeadCount
Head count doesn’t divide model dimension evenly
InvalidMaskShape
Invalid attention mask shape
MissingParameter(String)
Missing required parameter
CompilationError(String)
Compilation error when building einsum graph
CheckpointLoadError(String)
Error loading checkpoint file
Trait Implementations§
Source§impl Clone for TrustformerError
impl Clone for TrustformerError
Source§fn clone(&self) -> TrustformerError
fn clone(&self) -> TrustformerError
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 TrustformerError
impl Debug for TrustformerError
Source§impl Display for TrustformerError
impl Display for TrustformerError
Source§impl Error for TrustformerError
impl Error for TrustformerError
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()
Source§impl From<IrError> for TrustformerError
Convert IrError to TrustformerError (for ? operator)
impl From<IrError> for TrustformerError
Convert IrError to TrustformerError (for ? operator)
Source§impl PartialEq for TrustformerError
impl PartialEq for TrustformerError
impl StructuralPartialEq for TrustformerError
Auto Trait Implementations§
impl Freeze for TrustformerError
impl RefUnwindSafe for TrustformerError
impl Send for TrustformerError
impl Sync for TrustformerError
impl Unpin for TrustformerError
impl UnwindSafe for TrustformerError
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