pub enum TensorReadError {
Execution(ExecutionError),
Data(DataError),
InvalidShape {
expected: usize,
actual: usize,
},
}Expand description
Errors that can occur while reading host data from a tensor.
Variants§
Execution(ExecutionError)
Tensor execution failed while reading the data from the device.
Data(DataError)
The resulting TensorData could not satisfy the requested data operation.
InvalidShape
The tensor shape does not satisfy the read operation’s element-count requirement.
Trait Implementations§
Source§impl Debug for TensorReadError
impl Debug for TensorReadError
Source§impl Display for TensorReadError
impl Display for TensorReadError
Source§impl Error for TensorReadError
impl Error for TensorReadError
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<DataError> for TensorReadError
impl From<DataError> for TensorReadError
Source§impl From<ExecutionError> for TensorReadError
impl From<ExecutionError> for TensorReadError
Source§fn from(source: ExecutionError) -> Self
fn from(source: ExecutionError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for TensorReadError
impl RefUnwindSafe for TensorReadError
impl Send for TensorReadError
impl Sync for TensorReadError
impl Unpin for TensorReadError
impl UnsafeUnpin for TensorReadError
impl UnwindSafe for TensorReadError
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