pub struct TensorDescription {
pub id: TensorId,
pub shape: Vec<usize>,
pub status: TensorStatus,
pub dtype: DType,
}Available on crate feature
repr only.Expand description
A tensor definition represents a snapshot of a tensor when it was used.
§Example
A tensor that is used multiple times has its status updated for each operation.
- Status::NotInit
- Status::ReadOnly
- Status::ReadOnly
- Status::ReadWrite
Fields§
§id: TensorIdThe tensor id.
shape: Vec<usize>The shape of the tensor.
status: TensorStatusThe status of the tensor when it was used.
dtype: DTypeThe type of the tensor.
Trait Implementations§
Source§impl Clone for TensorDescription
impl Clone for TensorDescription
Source§fn clone(&self) -> TensorDescription
fn clone(&self) -> TensorDescription
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 TensorDescription
impl Debug for TensorDescription
Source§impl<'de> Deserialize<'de> for TensorDescription
impl<'de> Deserialize<'de> for TensorDescription
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
Source§impl Hash for TensorDescription
impl Hash for TensorDescription
Source§impl PartialEq for TensorDescription
impl PartialEq for TensorDescription
Source§impl Serialize for TensorDescription
impl Serialize for TensorDescription
impl Eq for TensorDescription
impl StructuralPartialEq for TensorDescription
Auto Trait Implementations§
impl Freeze for TensorDescription
impl RefUnwindSafe for TensorDescription
impl Send for TensorDescription
impl Sync for TensorDescription
impl Unpin for TensorDescription
impl UnwindSafe for TensorDescription
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.