pub struct TensorEntry {
pub name: String,
pub section: String,
pub dtype: StoredDtype,
pub shape: Vec<u64>,
pub offset: u64,
pub length: u64,
pub scales: Option<String>,
}Expand description
One tensor, located relative to the start of its section.
Fields§
§name: StringTensor name, unique within the artifact.
section: StringName of the section holding it.
dtype: StoredDtypeStorage dtype.
shape: Vec<u64>Logical shape.
offset: u64Offset relative to the section start, so a section can move without rewriting tensors.
length: u64Byte length; must equal the size implied by shape and dtype.
scales: Option<String>Name of the tensor holding this one’s quantization scales, when quantized.
Implementations§
Trait Implementations§
Source§impl Clone for TensorEntry
impl Clone for TensorEntry
Source§fn clone(&self) -> TensorEntry
fn clone(&self) -> TensorEntry
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 moreSource§impl Debug for TensorEntry
impl Debug for TensorEntry
impl Eq for TensorEntry
Source§impl PartialEq for TensorEntry
impl PartialEq for TensorEntry
impl StructuralPartialEq for TensorEntry
Auto Trait Implementations§
impl Freeze for TensorEntry
impl RefUnwindSafe for TensorEntry
impl Send for TensorEntry
impl Sync for TensorEntry
impl Unpin for TensorEntry
impl UnsafeUnpin for TensorEntry
impl UnwindSafe for TensorEntry
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