[−][src]Struct l2::tensor::Tensor
Fields
data: Vec<f32>
shape: Vec<usize>
strides: Vec<usize>
Implementations
impl<'a> Tensor<'a>
[src]
pub fn new<'b>(
data: Vec<f32>,
shape: &[usize]
) -> Result<Tensor<'b>, TensorError>
[src]
data: Vec<f32>,
shape: &[usize]
) -> Result<Tensor<'b>, TensorError>
pub fn new_no_grad<'b>(
data: Vec<f32>,
shape: &[usize]
) -> Result<Tensor<'b>, TensorError>
[src]
data: Vec<f32>,
shape: &[usize]
) -> Result<Tensor<'b>, TensorError>
pub fn zeros<'b>(shape: &[usize]) -> Result<Tensor<'b>, TensorError>
[src]
pub fn normal<'b>(
shape: &[usize],
mean: f32,
std: f32
) -> Result<Tensor<'b>, TensorError>
[src]
shape: &[usize],
mean: f32,
std: f32
) -> Result<Tensor<'b>, TensorError>
pub fn uniform<'b>(
shape: &[usize],
low: f32,
high: f32
) -> Result<Tensor<'b>, TensorError>
[src]
shape: &[usize],
low: f32,
high: f32
) -> Result<Tensor<'b>, TensorError>
pub fn slice(
&'a self,
logical_indices: &[[isize; 2]]
) -> Result<Self, TensorError>
[src]
&'a self,
logical_indices: &[[isize; 2]]
) -> Result<Self, TensorError>
pub fn view(&'a self, shape: &[isize]) -> Result<Self, TensorError>
[src]
pub fn pow(&self, exp: f32) -> Result<Tensor, TensorError>
[src]
pub fn sqrt(&self) -> Result<Tensor, TensorError>
[src]
pub fn exp(&self) -> Result<Tensor, TensorError>
[src]
pub fn log10(&self) -> Result<Tensor, TensorError>
[src]
pub fn log(&self) -> Result<Tensor, TensorError>
[src]
pub fn abs(&self) -> Result<Tensor, TensorError>
[src]
pub fn sin(&self) -> Result<Tensor, TensorError>
[src]
pub fn cos(&self) -> Result<Tensor, TensorError>
[src]
pub fn tan(&self) -> Result<Tensor, TensorError>
[src]
pub fn sum(&self, dim: isize) -> Result<Tensor, TensorError>
[src]
pub fn mean(&self, dim: isize) -> Result<Tensor, TensorError>
[src]
pub fn max(&self, dim: isize) -> Result<Tensor, TensorError>
[src]
pub fn min(&self, dim: isize) -> Result<Tensor, TensorError>
[src]
pub fn argmax(&self, dim: isize) -> Result<Tensor, TensorError>
[src]
pub fn argmin(&self, dim: isize) -> Result<Tensor, TensorError>
[src]
pub fn matmul(&'a self, rhs: &'a Tensor) -> Result<Tensor, TensorError>
[src]
pub fn concat(&self, rhs: &'a Tensor, dim: isize) -> Result<Tensor, TensorError>
[src]
pub fn transpose(&self) -> Result<Tensor, TensorError>
[src]
pub fn clone_no_grad(&self) -> Result<Tensor, TensorError>
[src]
pub fn backward(&self)
[src]
pub fn clear(&self)
[src]
Trait Implementations
impl<'a> Add<&'a Tensor<'a>> for &'a Tensor<'a>
[src]
type Output = Tensor<'a>
The resulting type after applying the +
operator.
fn add(self, other: &'a Tensor) -> Tensor<'a>
[src]
impl<'a> Clone for Tensor<'a>
[src]
fn clone(&self) -> Self
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<'a> Debug for Tensor<'a>
[src]
impl<'a> Display for Tensor<'a>
[src]
impl<'a> Div<&'a Tensor<'a>> for &'a Tensor<'a>
[src]
type Output = Tensor<'a>
The resulting type after applying the /
operator.
fn div(self, other: &'a Tensor) -> Tensor<'a>
[src]
impl<'a> Mul<&'a Tensor<'a>> for &'a Tensor<'a>
[src]
type Output = Tensor<'a>
The resulting type after applying the *
operator.
fn mul(self, other: &'a Tensor) -> Tensor<'a>
[src]
impl<'a> PartialEq<Tensor<'a>> for Tensor<'a>
[src]
impl<'a> StructuralPartialEq for Tensor<'a>
[src]
impl<'a> Sub<&'a Tensor<'a>> for &'a Tensor<'a>
[src]
Auto Trait Implementations
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> !UnwindSafe for Tensor<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,