pub struct ScalarQuantizationParams {
pub min: f32,
pub max: f32,
pub scale: f32,
}Expand description
Scalar quantization parameters for a single dimension
Fields§
§min: f32Minimum value in training data
max: f32Maximum value in training data
scale: f32Scale factor: (max - min) / 255
Implementations§
Trait Implementations§
Source§impl Clone for ScalarQuantizationParams
impl Clone for ScalarQuantizationParams
Source§fn clone(&self) -> ScalarQuantizationParams
fn clone(&self) -> ScalarQuantizationParams
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ScalarQuantizationParams
impl Debug for ScalarQuantizationParams
Source§impl<'de> Deserialize<'de> for ScalarQuantizationParams
impl<'de> Deserialize<'de> for ScalarQuantizationParams
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ScalarQuantizationParams
impl RefUnwindSafe for ScalarQuantizationParams
impl Send for ScalarQuantizationParams
impl Sync for ScalarQuantizationParams
impl Unpin for ScalarQuantizationParams
impl UnsafeUnpin for ScalarQuantizationParams
impl UnwindSafe for ScalarQuantizationParams
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
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>
Converts
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