pub enum GradientTransformError {
InvalidScalar,
InvalidDType,
ParameterMismatch(ParamId),
QuantizedGradient(ParamId),
UnknownParameters,
}Expand description
Invalid gradient metadata or an explicit scaling argument.
Variants§
InvalidScalar
The multiplier/divisor is not finite or cannot be represented in the work dtype.
InvalidDType
The requested arithmetic dtype is not F32 or F64.
ParameterMismatch(ParamId)
A gradient does not have its parameter’s geometry or device.
QuantizedGradient(ParamId)
A gradient is quantized; arithmetic must not silently dequantize it.
UnknownParameters
At least one registered gradient is not owned by the supplied module.
Trait Implementations§
Source§impl Clone for GradientTransformError
impl Clone for GradientTransformError
Source§impl Debug for GradientTransformError
impl Debug for GradientTransformError
Source§impl Display for GradientTransformError
impl Display for GradientTransformError
impl Eq for GradientTransformError
Source§impl Error for GradientTransformError
Available on crate feature std only.
impl Error for GradientTransformError
Available on crate feature
std only.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<GradientTransformError> for WeightedAccumulationError
impl From<GradientTransformError> for WeightedAccumulationError
Source§fn from(error: GradientTransformError) -> Self
fn from(error: GradientTransformError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for GradientTransformError
impl PartialEq for GradientTransformError
impl StructuralPartialEq for GradientTransformError
Auto Trait Implementations§
impl Freeze for GradientTransformError
impl RefUnwindSafe for GradientTransformError
impl Send for GradientTransformError
impl Sync for GradientTransformError
impl Unpin for GradientTransformError
impl UnsafeUnpin for GradientTransformError
impl UnwindSafe for GradientTransformError
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.