pub struct Tensor<'a> {
pub name: &'a str,
pub shape: &'a [i32],
pub dtype: DType,
pub data: Option<&'a [u8]>,
}Expand description
A statically shaped tensor definition.
Fields§
§name: &'a strUnique block-local tensor name.
shape: &'a [i32]Concrete dimensions. Scalars use an empty slice.
dtype: DTypeStable TOSA 1.0 element type.
data: Option<&'a [u8]>Inline constant bytes, when this tensor is produced by CONST.
Implementations§
Trait Implementations§
impl<'a> Copy for Tensor<'a>
impl<'a> Eq for Tensor<'a>
Source§impl<'a> From<Tensor<'a>> for OwnedTensor<'a>
impl<'a> From<Tensor<'a>> for OwnedTensor<'a>
Source§impl<'a> PartialEq for Tensor<'a>
impl<'a> PartialEq for Tensor<'a>
impl<'a> StructuralPartialEq for Tensor<'a>
Auto Trait Implementations§
impl<'a> Freeze for Tensor<'a>
impl<'a> RefUnwindSafe for Tensor<'a>
impl<'a> Send for Tensor<'a>
impl<'a> Sync for Tensor<'a>
impl<'a> Unpin for Tensor<'a>
impl<'a> UnsafeUnpin for Tensor<'a>
impl<'a> UnwindSafe for Tensor<'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