pub enum ShapeGuardError {
LocalWithoutAttachedGraph {
local_id: usize,
},
LocalOutOfBounds {
local_id: usize,
},
MissingMetadata {
key: ValueKey<StdTensorOp>,
},
NonExactShape {
key: ValueKey<StdTensorOp>,
},
}Expand description
Error returned when shape-guard metadata cannot be resolved.
Variants§
LocalWithoutAttachedGraph
A local graph value was queried before a graph was attached.
LocalOutOfBounds
A local graph value id is outside the attached graph’s value table.
MissingMetadata
No metadata was registered for the resolved value key.
Fields
§
key: ValueKey<StdTensorOp>Resolved value key.
NonExactShape
Metadata exists, but at least one axis is only bounded or unknown.
Fields
§
key: ValueKey<StdTensorOp>Resolved value key.
Trait Implementations§
Source§impl Clone for ShapeGuardError
impl Clone for ShapeGuardError
Source§fn clone(&self) -> ShapeGuardError
fn clone(&self) -> ShapeGuardError
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 ShapeGuardError
impl Debug for ShapeGuardError
Source§impl Display for ShapeGuardError
impl Display for ShapeGuardError
Source§impl Error for ShapeGuardError
impl Error for ShapeGuardError
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<ShapeGuardError> for ADRuleError
Available on crate feature autodiff only.
impl From<ShapeGuardError> for ADRuleError
Available on crate feature
autodiff only.Source§fn from(err: ShapeGuardError) -> Self
fn from(err: ShapeGuardError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for ShapeGuardError
impl PartialEq for ShapeGuardError
impl Eq for ShapeGuardError
impl StructuralPartialEq for ShapeGuardError
Auto Trait Implementations§
impl Freeze for ShapeGuardError
impl !RefUnwindSafe for ShapeGuardError
impl Send for ShapeGuardError
impl Sync for ShapeGuardError
impl Unpin for ShapeGuardError
impl UnsafeUnpin for ShapeGuardError
impl !UnwindSafe for ShapeGuardError
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