pub enum ShapeInferenceError {
NodeNotFound(NodeId),
InvalidReshape {
source_shape: Vec<usize>,
target_shape: Vec<usize>,
reason: String,
},
InvalidTranspose {
shape: Vec<usize>,
axes: Vec<usize>,
reason: String,
},
InvalidBroadcast {
source_shape: Vec<usize>,
target_shape: Vec<usize>,
reason: String,
},
InvalidConcatenate {
shape1: Vec<usize>,
shape2: Vec<usize>,
axis: usize,
reason: String,
},
InvalidSlice {
shape: Vec<usize>,
ranges: Vec<(usize, usize)>,
reason: String,
},
CyclicDependency(NodeId),
UnknownShape(NodeId),
}Expand description
Shape inference error
Variants§
NodeNotFound(NodeId)
Node not found
InvalidReshape
Invalid reshape target
InvalidTranspose
Invalid transpose axes
InvalidBroadcast
Invalid broadcast
InvalidConcatenate
Invalid concatenation
InvalidSlice
Invalid slice
CyclicDependency(NodeId)
Cyclic dependency detected
UnknownShape(NodeId)
Unknown shape (cannot infer)
Trait Implementations§
Source§impl Clone for ShapeInferenceError
impl Clone for ShapeInferenceError
Source§fn clone(&self) -> ShapeInferenceError
fn clone(&self) -> ShapeInferenceError
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 ShapeInferenceError
impl Debug for ShapeInferenceError
Source§impl Display for ShapeInferenceError
impl Display for ShapeInferenceError
Source§impl Error for ShapeInferenceError
Available on crate feature std only.
impl Error for ShapeInferenceError
Available on crate feature
std only.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 PartialEq for ShapeInferenceError
impl PartialEq for ShapeInferenceError
impl Eq for ShapeInferenceError
impl StructuralPartialEq for ShapeInferenceError
Auto Trait Implementations§
impl Freeze for ShapeInferenceError
impl RefUnwindSafe for ShapeInferenceError
impl Send for ShapeInferenceError
impl Sync for ShapeInferenceError
impl Unpin for ShapeInferenceError
impl UnsafeUnpin for ShapeInferenceError
impl UnwindSafe for ShapeInferenceError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more