pub enum SmeltError {
DimensionMismatch {
expected: Vec<usize>,
got: Vec<usize>,
},
InsufficientRank {
minimum_rank: usize,
},
InvalidRank {
expected_rank: usize,
},
VectorTooSmall {
minimum: usize,
},
OutOfVocabulary {
vocab_size: usize,
id: usize,
},
InvalidLength {
expected: usize,
got: usize,
},
}
Expand description
Potential errors when using the library
Variants§
DimensionMismatch
The operation could not succeed because the shapes are not valid.
Fields
InsufficientRank
The tensor given has insufficient rank (rank 2 means a tensor that has a shape of length 2)
InvalidRank
The tensor given has not the expected rank (rank 2 means a tensor that has a shape of length 2)
VectorTooSmall
The tensor given has not enough room for the operations
OutOfVocabulary
The select operation attempted to select out of the tensor
InvalidLength
Some slices do not have the expected lengths
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SmeltError
impl RefUnwindSafe for SmeltError
impl Send for SmeltError
impl Sync for SmeltError
impl Unpin for SmeltError
impl UnwindSafe for SmeltError
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