#[non_exhaustive]pub enum NnError {
ShapeMismatch {
expected: Vec<usize>,
got: Vec<usize>,
},
NoGradient,
InvalidParameter {
name: &'static str,
reason: &'static str,
},
EmptyInput,
IndexOutOfBounds {
index: usize,
len: usize,
},
OnnxError(String),
SerializeError(String),
CoreError(CoreError),
}Expand description
Errors produced by scivex-nn.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
ShapeMismatch
Shape mismatch between expected and actual.
NoGradient
Gradient is not available (variable does not require grad or backward not called).
InvalidParameter
An invalid hyper-parameter was supplied.
EmptyInput
Input data is empty.
IndexOutOfBounds
Index out of bounds.
OnnxError(String)
ONNX model loading or execution error.
SerializeError(String)
Serialization / deserialization error.
CoreError(CoreError)
Error propagated from scivex-core.
Trait Implementations§
Source§impl Error for NnError
impl Error for NnError
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()
impl StructuralPartialEq for NnError
Auto Trait Implementations§
impl Freeze for NnError
impl RefUnwindSafe for NnError
impl Send for NnError
impl Sync for NnError
impl Unpin for NnError
impl UnsafeUnpin for NnError
impl UnwindSafe for NnError
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