[][src]Struct math::tensor::TensorShape

pub struct TensorShape { /* fields omitted */ }

The shape of an N-dimensional tensor has a size for each dimension, with an associated stride, e.g., a row-major 3 x 5 matrix will have a stride of 5 for the dimension of size 3 and a stride of 1 for the dimension of size 5, and the resulting dims_strides is [(3, 5), (5, 1)]. Index 0 of dims_strides always refers to the leftmost dimension.

Implementations

impl TensorShape[src]

pub fn dims(&self) -> Vec<Length>[src]

pub fn strides(&self) -> Vec<Stride>[src]

pub fn ndim(&self) -> usize[src]

pub fn num_elements(&self) -> usize[src]

Trait Implementations

impl Clone for TensorShape[src]

impl Debug for TensorShape[src]

impl Eq for TensorShape[src]

impl<'_> From<&'_ [isize; 1]> for TensorShape[src]

impl<'_> From<&'_ [isize; 2]> for TensorShape[src]

impl<'_> From<&'_ [isize; 3]> for TensorShape[src]

impl<'_> From<&'_ [isize; 4]> for TensorShape[src]

impl<'_> From<&'_ [isize; 5]> for TensorShape[src]

impl<'_> From<&'_ [isize; 6]> for TensorShape[src]

impl<'_> From<&'_ [isize; 7]> for TensorShape[src]

impl<'_> From<&'_ [isize; 8]> for TensorShape[src]

impl<'_> From<&'_ [usize; 1]> for TensorShape[src]

impl<'_> From<&'_ [usize; 2]> for TensorShape[src]

impl<'_> From<&'_ [usize; 3]> for TensorShape[src]

impl<'_> From<&'_ [usize; 4]> for TensorShape[src]

impl<'_> From<&'_ [usize; 5]> for TensorShape[src]

impl<'_> From<&'_ [usize; 6]> for TensorShape[src]

impl<'_> From<&'_ [usize; 7]> for TensorShape[src]

impl<'_> From<&'_ [usize; 8]> for TensorShape[src]

impl<'_> From<&'_ Vec<i32, Global>> for TensorShape[src]

impl<'_> From<&'_ Vec<i64, Global>> for TensorShape[src]

impl<'_> From<&'_ Vec<isize, Global>> for TensorShape[src]

impl<'_> From<&'_ Vec<u32, Global>> for TensorShape[src]

impl<'_> From<&'_ Vec<u64, Global>> for TensorShape[src]

impl<'_> From<&'_ Vec<usize, Global>> for TensorShape[src]

impl From<[i32; 1]> for TensorShape[src]

impl From<[i32; 2]> for TensorShape[src]

impl From<[i32; 3]> for TensorShape[src]

impl From<[i32; 4]> for TensorShape[src]

impl From<[i32; 5]> for TensorShape[src]

impl From<[i32; 6]> for TensorShape[src]

impl From<[i32; 7]> for TensorShape[src]

impl From<[i32; 8]> for TensorShape[src]

impl From<[i64; 1]> for TensorShape[src]

impl From<[i64; 2]> for TensorShape[src]

impl From<[i64; 3]> for TensorShape[src]

impl From<[i64; 4]> for TensorShape[src]

impl From<[i64; 5]> for TensorShape[src]

impl From<[i64; 6]> for TensorShape[src]

impl From<[i64; 7]> for TensorShape[src]

impl From<[i64; 8]> for TensorShape[src]

impl From<[isize; 1]> for TensorShape[src]

impl From<[isize; 2]> for TensorShape[src]

impl From<[isize; 3]> for TensorShape[src]

impl From<[isize; 4]> for TensorShape[src]

impl From<[isize; 5]> for TensorShape[src]

impl From<[isize; 6]> for TensorShape[src]

impl From<[isize; 7]> for TensorShape[src]

impl From<[isize; 8]> for TensorShape[src]

impl From<[u32; 1]> for TensorShape[src]

impl From<[u32; 2]> for TensorShape[src]

impl From<[u32; 3]> for TensorShape[src]

impl From<[u32; 4]> for TensorShape[src]

impl From<[u32; 5]> for TensorShape[src]

impl From<[u32; 6]> for TensorShape[src]

impl From<[u32; 7]> for TensorShape[src]

impl From<[u32; 8]> for TensorShape[src]

impl From<[u64; 1]> for TensorShape[src]

impl From<[u64; 2]> for TensorShape[src]

impl From<[u64; 3]> for TensorShape[src]

impl From<[u64; 4]> for TensorShape[src]

impl From<[u64; 5]> for TensorShape[src]

impl From<[u64; 6]> for TensorShape[src]

impl From<[u64; 7]> for TensorShape[src]

impl From<[u64; 8]> for TensorShape[src]

impl From<[usize; 1]> for TensorShape[src]

impl From<[usize; 2]> for TensorShape[src]

impl From<[usize; 3]> for TensorShape[src]

impl From<[usize; 4]> for TensorShape[src]

impl From<[usize; 5]> for TensorShape[src]

impl From<[usize; 6]> for TensorShape[src]

impl From<[usize; 7]> for TensorShape[src]

impl From<[usize; 8]> for TensorShape[src]

impl From<Vec<i32, Global>> for TensorShape[src]

impl From<Vec<i64, Global>> for TensorShape[src]

impl From<Vec<isize, Global>> for TensorShape[src]

impl From<Vec<u32, Global>> for TensorShape[src]

impl From<Vec<u64, Global>> for TensorShape[src]

impl From<Vec<usize, Global>> for TensorShape[src]

impl Ord for TensorShape[src]

impl PartialEq<TensorShape> for TensorShape[src]

impl PartialOrd<TensorShape> for TensorShape[src]

impl StructuralEq for TensorShape[src]

impl StructuralPartialEq for TensorShape[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,