pub struct CompressionPipeline { /* private fields */ }Expand description
Model compression pipeline
Implementations§
Source§impl CompressionPipeline
impl CompressionPipeline
Sourcepub fn new(config: CompressionConfig) -> Result<Self>
pub fn new(config: CompressionConfig) -> Result<Self>
Create a new compression pipeline
Sourcepub fn compress<M: Model>(&self, model: M) -> Result<CompressedModel<M>>
pub fn compress<M: Model>(&self, model: M) -> Result<CompressedModel<M>>
Compress a model using the configured pipeline
Sourcepub fn analyze_compression<M: Model>(
&self,
model: &CompressedModel<M>,
) -> CompressionAnalysis
pub fn analyze_compression<M: Model>( &self, model: &CompressedModel<M>, ) -> CompressionAnalysis
Analyze compression results
Auto Trait Implementations§
impl Freeze for CompressionPipeline
impl RefUnwindSafe for CompressionPipeline
impl Send for CompressionPipeline
impl Sync for CompressionPipeline
impl Unpin for CompressionPipeline
impl UnsafeUnpin for CompressionPipeline
impl UnwindSafe for CompressionPipeline
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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