pub struct Tensor<'a>(/* private fields */);Expand description
Borrowed tensor view.
Implementations§
Source§impl<'a> Tensor<'a>
impl<'a> Tensor<'a>
pub fn name(&self) -> &'a str
pub fn dtype(&self) -> DType
pub fn rank(&self) -> Option<usize>
pub fn dimensions(&self) -> impl Iterator<Item = i32> + 'a
Sourcepub fn dimension(&self, index: usize) -> Option<i32>
pub fn dimension(&self, index: usize) -> Option<i32>
One ranked dimension without constructing or advancing an iterator.
pub fn data(&self) -> &'a [u8]
pub fn is_variable(&self) -> bool
pub fn variable_name(&self) -> Option<&'a str>
pub fn external_data_range(&self) -> Option<(u64, u64)>
Trait Implementations§
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