concision_params/
error.rs1pub type Result<T = ()> = core::result::Result<T, ParamsError>;
10
11#[derive(Debug, thiserror::Error)]
14pub enum ParamsError {
15 #[error("Invalid biases")]
16 InvalidBiases,
17 #[error("Invalid weights")]
18 InvalidWeights,
19 #[error(
20 "Unable to complete the operation due to a mismatch between shapes: expected {expected:?}, found {found:?}"
21 )]
22 MismatchedShapes {
23 expected: &'static [usize],
24 found: &'static [usize],
25 },
26 #[error("An invalid tensor of length {0} was provided")]
27 InvalidLength(usize),
28 #[error("Invalid output shape")]
29 InvalidOutputShape,
30 #[error("Invalid parameter: {0}")]
31 InvalidParameter(String),
32 #[error("Invalid parameter type")]
33 InvalidParameterType,
34 #[error("Invalid parameter value")]
35 InvalidParameterValue,
36 #[error("Must be non-empty")]
37 EmptyInput,
38 #[error(transparent)]
39 ShapeError(#[from] ndarray::ShapeError),
40}