pub enum Error {
InvalidSubscripts(String),
ContractionError(String),
MissingInput(String),
NonScalarGrad {
shape: Vec<usize>,
},
TensorRuntime(Error),
UnexpectedBinding {
binding_index: usize,
},
UnboundPlaceholder {
input_key: String,
},
DuplicateBinding {
input_key: String,
},
PlaceholderDtypeMismatch {
expected: DType,
actual: DType,
},
PlaceholderShapeMismatch {
expected: Vec<usize>,
actual: Vec<usize>,
},
PlaceholderRankMismatch {
expected: usize,
actual: usize,
},
Internal(String),
}Expand description
Variants§
InvalidSubscripts(String)
Einsum subscript string is invalid or cannot be parsed.
ContractionError(String)
Contraction optimization failed (shape mismatch, bad path, etc.).
MissingInput(String)
A required input tensor is missing from the inputs map.
NonScalarGrad
Reverse-mode gradient requires a scalar output.
TensorRuntime(Error)
Runtime tensor execution failed in the backend layer.
UnexpectedBinding
A TracedTensor passed to eval_with_inputs bindings is not a
placeholder (has attached data).
UnboundPlaceholder
A placeholder appearing in the graph has no binding supplied.
DuplicateBinding
The same placeholder was bound more than once in the bindings slice.
PlaceholderDtypeMismatch
A binding tensor’s dtype does not match the placeholder’s dtype.
PlaceholderShapeMismatch
A binding tensor’s shape does not match an input_concrete_shape
placeholder’s fixed shape.
PlaceholderRankMismatch
A binding tensor’s rank does not match an input_symbolic_shape
placeholder’s declared rank.
Internal(String)
An unexpected internal error.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
impl UnwindSafe for Error
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
§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
fn rand<T>(&self, rng: &mut (impl Rng + ?Sized)) -> Twhere
Self: Distribution<T>,
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>
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>
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