pub struct QuantizeBlock<I, T>{
pub data: BlockData,
/* private fields */
}Expand description
Quantizes the input to the nearest integer multiple of the provided interval.
For example, if the interval is 0.5, the input 0.51 will be quantized to 0.5 If the interval is 0.5, the input 0.75 will be quantized to 1.0 For matrices, the process is applied element-wise
Fields§
§data: BlockDataTrait Implementations§
Source§impl<I, T> Default for QuantizeBlock<I, T>
impl<I, T> Default for QuantizeBlock<I, T>
Source§impl<I, T> ProcessBlock for QuantizeBlock<I, T>
impl<I, T> ProcessBlock for QuantizeBlock<I, T>
Auto Trait Implementations§
impl<I, T> Freeze for QuantizeBlock<I, T>where
<T as Apply<I>>::Output: Freeze,
impl<I, T> RefUnwindSafe for QuantizeBlock<I, T>where
<T as Apply<I>>::Output: RefUnwindSafe,
impl<I, T> Send for QuantizeBlock<I, T>where
<T as Apply<I>>::Output: Send,
impl<I, T> Sync for QuantizeBlock<I, T>where
<T as Apply<I>>::Output: Sync,
impl<I, T> Unpin for QuantizeBlock<I, T>where
<T as Apply<I>>::Output: Unpin,
impl<I, T> UnsafeUnpin for QuantizeBlock<I, T>where
<T as Apply<I>>::Output: UnsafeUnpin,
impl<I, T> UnwindSafe for QuantizeBlock<I, T>where
<T as Apply<I>>::Output: UnwindSafe,
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<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.