pub struct TensorCompress { /* private fields */ }Expand description
Tensor compressor with adaptive level selection
Implementations§
Source§impl TensorCompress
impl TensorCompress
Sourcepub fn compress_with_level(
&self,
embedding: &[f32],
level: &CompressionLevel,
) -> Result<CompressedTensor>
pub fn compress_with_level( &self, embedding: &[f32], level: &CompressionLevel, ) -> Result<CompressedTensor>
Compress with explicit compression level
Sourcepub fn decompress(&self, compressed: &CompressedTensor) -> Result<Vec<f32>>
pub fn decompress(&self, compressed: &CompressedTensor) -> Result<Vec<f32>>
Decompress a compressed tensor
Trait Implementations§
Source§impl Clone for TensorCompress
impl Clone for TensorCompress
Source§fn clone(&self) -> TensorCompress
fn clone(&self) -> TensorCompress
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 TensorCompress
impl Debug for TensorCompress
Auto Trait Implementations§
impl Freeze for TensorCompress
impl RefUnwindSafe for TensorCompress
impl Send for TensorCompress
impl Sync for TensorCompress
impl Unpin for TensorCompress
impl UnsafeUnpin for TensorCompress
impl UnwindSafe for TensorCompress
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