pub enum QuantizeError {
Load(LoadError),
Io(Error),
InvalidUtf8(FromUtf8Error),
InvalidIntegerConversion(TryFromIntError),
CreateFileFailed {
source: Error,
path: PathBuf,
},
InvariantBroken {
path: PathBuf,
invariant: String,
},
InvalidQuantizationTarget {
element_type: Type,
},
UnsupportedElementType {
element_type: Type,
},
HyperparametersWriteError(HyperparametersWriteError),
}
Expand description
Errors encountered during the quantization process.
Variants§
Load(LoadError)
There was an error while attempting to load the model.
Io(Error)
A non-specific IO error.
InvalidUtf8(FromUtf8Error)
One of the strings encountered was not valid UTF-8.
InvalidIntegerConversion(TryFromIntError)
One of the integers encountered could not be converted to a more appropriate type.
CreateFileFailed
A file failed to create.
InvariantBroken
An invariant was broken.
This error is not relevant unless loader2
is being used.
InvalidQuantizationTarget
Attempted to quantize to an invalid target.
UnsupportedElementType
The quantization process encountered an unsupported element type.
HyperparametersWriteError(HyperparametersWriteError)
An error was encountered while writing the hyperparameters.
Trait Implementations§
Source§impl Debug for QuantizeError
impl Debug for QuantizeError
Source§impl Display for QuantizeError
impl Display for QuantizeError
Source§impl Error for QuantizeError
impl Error for QuantizeError
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<Error> for QuantizeError
impl From<Error> for QuantizeError
Source§impl From<FromUtf8Error> for QuantizeError
impl From<FromUtf8Error> for QuantizeError
Source§fn from(source: FromUtf8Error) -> Self
fn from(source: FromUtf8Error) -> Self
Converts to this type from the input type.
Source§impl From<LoadError> for QuantizeError
impl From<LoadError> for QuantizeError
Source§impl From<TryFromIntError> for QuantizeError
impl From<TryFromIntError> for QuantizeError
Source§fn from(source: TryFromIntError) -> Self
fn from(source: TryFromIntError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for QuantizeError
impl !RefUnwindSafe for QuantizeError
impl Send for QuantizeError
impl Sync for QuantizeError
impl Unpin for QuantizeError
impl !UnwindSafe for QuantizeError
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