pub struct QuantizedLinearBuilder {
pub input_dims: i32,
pub output_dims: i32,
pub group_size: i32,
pub bits: i32,
pub bias: bool,
}Expand description
Builder for QuantizedLinear
Fields§
§input_dims: i32The dimensionality of the input features.
output_dims: i32The dimensionality of the output features.
group_size: i32Quantization group size. Default to QuantizedLinear::DEFAULT_GROUP_SIZE
bits: i32Bits per parameter. Default to QuantizedLinear::DEFAULT_BITS
bias: boolWhether the linear layer has a bias. Default to Linear::DEFAULT_BIAS
Implementations§
Source§impl QuantizedLinearBuilder
impl QuantizedLinearBuilder
Sourcepub fn build_with_linear(
self,
other: Linear,
) -> Result<QuantizedLinear, Exception>
pub fn build_with_linear( self, other: Linear, ) -> Result<QuantizedLinear, Exception>
Convenience method to build a new QuantizedLinear with an existing Linear
Trait Implementations§
Source§impl Clone for QuantizedLinearBuilder
impl Clone for QuantizedLinearBuilder
Source§fn clone(&self) -> QuantizedLinearBuilder
fn clone(&self) -> QuantizedLinearBuilder
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 moreAuto Trait Implementations§
impl Freeze for QuantizedLinearBuilder
impl RefUnwindSafe for QuantizedLinearBuilder
impl Send for QuantizedLinearBuilder
impl Sync for QuantizedLinearBuilder
impl Unpin for QuantizedLinearBuilder
impl UnwindSafe for QuantizedLinearBuilder
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 moreSource§impl<T> IntoOption<T> for T
impl<T> IntoOption<T> for T
Source§fn into_option(self) -> Option<T>
fn into_option(self) -> Option<T>
Convert into an
Option.