pub struct OutputTensor {
pub dtype: Dtype,
pub shape: Vec<usize>,
pub data: Vec<u8>,
}Expand description
One tensor to be written: its dtype, shape, and raw little-endian bytes (already in whatever
on-disk representation dtype implies – e.g. packed U8 nibbles for INT4).
Fields§
§dtype: DtypeThe tensor’s on-disk dtype.
shape: Vec<usize>The tensor’s logical shape (for packed formats like INT4 this is the packed shape –
see quantization_config metadata for the true logical shape).
data: Vec<u8>Raw little-endian element bytes, shape.iter().product() * dtype.bitsize() / 8 long.
Trait Implementations§
Source§impl Clone for OutputTensor
impl Clone for OutputTensor
Source§fn clone(&self) -> OutputTensor
fn clone(&self) -> OutputTensor
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 OutputTensor
impl RefUnwindSafe for OutputTensor
impl Send for OutputTensor
impl Sync for OutputTensor
impl Unpin for OutputTensor
impl UnsafeUnpin for OutputTensor
impl UnwindSafe for OutputTensor
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