pub struct DenseI64Tensor { /* private fields */ }Expand description
Dense tensor backed by Vec<i64> storage.
Integer tensors do NOT participate in autograd (requires_grad is always false).
They are used for indexing, class labels, and shape operations.
Implementations§
Source§impl DenseI64Tensor
impl DenseI64Tensor
pub fn from_storage( meta: TensorMeta, storage: Vec<i64>, ) -> Result<Self, DenseTensorError>
pub fn from_contiguous_values( values: Vec<i64>, shape: Vec<usize>, device: Device, ) -> Result<Self, DenseTensorError>
pub fn id(&self) -> u64
pub fn storage_id(&self) -> u64
pub fn meta(&self) -> &TensorMeta
pub fn storage(&self) -> &[i64]
Sourcepub fn contiguous_values(&self) -> Result<&[i64], DenseTensorError>
pub fn contiguous_values(&self) -> Result<&[i64], DenseTensorError>
Return the contiguous values slice.
pub fn version(&self) -> u64
Trait Implementations§
Source§impl Clone for DenseI64Tensor
impl Clone for DenseI64Tensor
Source§fn clone(&self) -> DenseI64Tensor
fn clone(&self) -> DenseI64Tensor
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 Debug for DenseI64Tensor
impl Debug for DenseI64Tensor
impl Eq for DenseI64Tensor
Source§impl PartialEq for DenseI64Tensor
impl PartialEq for DenseI64Tensor
impl StructuralPartialEq for DenseI64Tensor
Auto Trait Implementations§
impl Freeze for DenseI64Tensor
impl RefUnwindSafe for DenseI64Tensor
impl Send for DenseI64Tensor
impl Sync for DenseI64Tensor
impl Unpin for DenseI64Tensor
impl UnsafeUnpin for DenseI64Tensor
impl UnwindSafe for DenseI64Tensor
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