pub enum TensorError {
Shape(ShapeError),
Device(DeviceError),
Memory(MemoryError),
Kernel(KernelError),
Param(ParamError),
Autograd(AutogradError),
Random(RandomError),
Common(CommonError),
}Expand description
Base error type for all tensor operations
Variants§
Shape(ShapeError)
Shape-related errors such as dimension mismatch, broadcasting errors
Device(DeviceError)
Device-related errors such as device not found, CUDA errors
Memory(MemoryError)
Memory-related errors such as memory allocation failed, invalid memory layout
Kernel(KernelError)
Kernel-related errors such as kernel compilation failed, kernel execution failed
Param(ParamError)
Parameter-related errors such as invalid function arguments
Autograd(AutogradError)
Autograd-related errors such as inplace computation is not allowed
Random(RandomError)
Random distribution-related errors such as invalid distribution parameters
Common(CommonError)
Common errors such as lock failed
Trait Implementations§
Source§impl Debug for TensorError
impl Debug for TensorError
Source§impl Display for TensorError
impl Display for TensorError
Source§impl Error for TensorError
impl Error for TensorError
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<AutogradError> for TensorError
impl From<AutogradError> for TensorError
Source§fn from(source: AutogradError) -> Self
fn from(source: AutogradError) -> Self
Converts to this type from the input type.
Source§impl From<BernoulliError> for TensorError
impl From<BernoulliError> for TensorError
Source§fn from(source: BernoulliError) -> Self
fn from(source: BernoulliError) -> Self
Converts to this type from the input type.
Source§impl From<Error> for TensorError
impl From<Error> for TensorError
Source§impl From<Error> for TensorError
impl From<Error> for TensorError
Source§fn from(source: ChiSquaredError) -> Self
fn from(source: ChiSquaredError) -> Self
Converts to this type from the input type.
Source§impl From<CommonError> for TensorError
impl From<CommonError> for TensorError
Source§fn from(source: CommonError) -> Self
fn from(source: CommonError) -> Self
Converts to this type from the input type.
Source§impl From<DeviceError> for TensorError
impl From<DeviceError> for TensorError
Source§fn from(source: DeviceError) -> Self
fn from(source: DeviceError) -> Self
Converts to this type from the input type.
Source§impl From<Error> for TensorError
impl From<Error> for TensorError
Source§impl From<Error> for TensorError
impl From<Error> for TensorError
Source§impl From<Error> for TensorError
impl From<Error> for TensorError
Source§fn from(source: GammaError) -> Self
fn from(source: GammaError) -> Self
Converts to this type from the input type.
Source§impl From<Error> for TensorError
impl From<Error> for TensorError
Source§fn from(source: GumbelError) -> Self
fn from(source: GumbelError) -> Self
Converts to this type from the input type.
Source§impl From<KernelError> for TensorError
impl From<KernelError> for TensorError
Source§fn from(source: KernelError) -> Self
fn from(source: KernelError) -> Self
Converts to this type from the input type.
Source§impl From<MemoryError> for TensorError
impl From<MemoryError> for TensorError
Source§fn from(source: MemoryError) -> Self
fn from(source: MemoryError) -> Self
Converts to this type from the input type.
Source§impl From<Error> for TensorError
impl From<Error> for TensorError
Source§fn from(source: NormalError) -> Self
fn from(source: NormalError) -> Self
Converts to this type from the input type.
Source§impl From<Error> for TensorError
impl From<Error> for TensorError
Source§fn from(source: NormalInverseGaussianError) -> Self
fn from(source: NormalInverseGaussianError) -> Self
Converts to this type from the input type.
Source§impl From<ParamError> for TensorError
impl From<ParamError> for TensorError
Source§fn from(source: ParamError) -> Self
fn from(source: ParamError) -> Self
Converts to this type from the input type.
Source§impl From<Error> for TensorError
impl From<Error> for TensorError
Source§fn from(source: ParetoError) -> Self
fn from(source: ParetoError) -> Self
Converts to this type from the input type.
Source§impl From<Error> for TensorError
impl From<Error> for TensorError
Source§fn from(source: PoissonError) -> Self
fn from(source: PoissonError) -> Self
Converts to this type from the input type.
Source§impl From<RandomError> for TensorError
impl From<RandomError> for TensorError
Source§fn from(source: RandomError) -> Self
fn from(source: RandomError) -> Self
Converts to this type from the input type.
Source§impl From<ShapeError> for TensorError
impl From<ShapeError> for TensorError
Source§fn from(source: ShapeError) -> Self
fn from(source: ShapeError) -> Self
Converts to this type from the input type.
Source§impl From<TriangularError> for TensorError
impl From<TriangularError> for TensorError
Source§fn from(source: TriangularError) -> Self
fn from(source: TriangularError) -> Self
Converts to this type from the input type.
Source§impl From<Error> for TensorError
impl From<Error> for TensorError
Source§fn from(source: WeibullError) -> Self
fn from(source: WeibullError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for TensorError
impl !RefUnwindSafe for TensorError
impl Send for TensorError
impl Sync for TensorError
impl Unpin for TensorError
impl !UnwindSafe for TensorError
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