Struct safetensors::tensor::TensorInfo
source · pub struct TensorInfo {
pub dtype: Dtype,
pub shape: Vec<usize>,
pub data_offsets: (usize, usize),
}
Expand description
A single tensor information. Endianness is assumed to be little endian Ordering is assumed to be ‘C’.
Fields§
§dtype: Dtype
The type of each element of the tensor
shape: Vec<usize>
The shape of the tensor
data_offsets: (usize, usize)
The offsets to find the data within the byte-buffer array.
Trait Implementations§
source§impl Clone for TensorInfo
impl Clone for TensorInfo
source§fn clone(&self) -> TensorInfo
fn clone(&self) -> TensorInfo
Returns a copy 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 TensorInfo
impl Debug for TensorInfo
source§impl<'de> Deserialize<'de> for TensorInfo
impl<'de> Deserialize<'de> for TensorInfo
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for TensorInfo
impl RefUnwindSafe for TensorInfo
impl Send for TensorInfo
impl Sync for TensorInfo
impl Unpin for TensorInfo
impl UnwindSafe for TensorInfo
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