pub struct OwnedTensor<'a> {
pub name: String,
pub shape: Vec<i32>,
pub dtype: DType,
pub data: Option<Cow<'a, [u8]>>,
}Expand description
An owned tensor definition for incrementally assembled graphs.
Fields§
§name: String§shape: Vec<i32>§dtype: DType§data: Option<Cow<'a, [u8]>>Inline constant bytes. Existing frontend storage may be borrowed to avoid a second copy; newly transformed data can be moved into this field.
Implementations§
Source§impl<'a> OwnedTensor<'a>
impl<'a> OwnedTensor<'a>
Trait Implementations§
Source§impl<'a> Clone for OwnedTensor<'a>
impl<'a> Clone for OwnedTensor<'a>
Source§fn clone(&self) -> OwnedTensor<'a>
fn clone(&self) -> OwnedTensor<'a>
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<'a> Debug for OwnedTensor<'a>
impl<'a> Debug for OwnedTensor<'a>
impl<'a> Eq for OwnedTensor<'a>
Source§impl<'a> From<Tensor<'a>> for OwnedTensor<'a>
impl<'a> From<Tensor<'a>> for OwnedTensor<'a>
Source§impl<'a> PartialEq for OwnedTensor<'a>
impl<'a> PartialEq for OwnedTensor<'a>
Source§fn eq(&self, other: &OwnedTensor<'a>) -> bool
fn eq(&self, other: &OwnedTensor<'a>) -> bool
Tests for
self and other values to be equal, and is used by ==.impl<'a> StructuralPartialEq for OwnedTensor<'a>
Auto Trait Implementations§
impl<'a> Freeze for OwnedTensor<'a>
impl<'a> RefUnwindSafe for OwnedTensor<'a>
impl<'a> Send for OwnedTensor<'a>
impl<'a> Sync for OwnedTensor<'a>
impl<'a> Unpin for OwnedTensor<'a>
impl<'a> UnsafeUnpin for OwnedTensor<'a>
impl<'a> UnwindSafe for OwnedTensor<'a>
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