[−][src]Struct auto_diff::tensor::Tensor
Methods
impl Tensor[src]
pub fn new() -> Tensor[src]
pub fn is_empty() -> bool[src]
pub fn size(&self) -> Vec<usize>[src]
pub fn numel(&self) -> usize[src]
pub fn get_scale_f32(&self) -> f32[src]
pub fn get_N(&self) -> Tensor[src]
pub fn get_C(&self) -> Tensor[src]
pub fn get_D(&self) -> Tensor[src]
pub fn get_H(&self) -> Tensor[src]
pub fn get_W(&self) -> Tensor[src]
pub fn numel_tensor(&self) -> Tensor[src]
pub fn same_shape(&self, o: &Tensor) -> bool[src]
pub fn from_vec_f32(input: &[f32], dim: &[usize]) -> Tensor[src]
Create a tensor from a Vec,
let t1 = Tensor::from_vec_f32(&vec![0., 1., 2., 4.,], &vec![2,2]);
pub fn to_vec_f32(&mut self) -> Vec<f32>[src]
pub fn from_vec_f64(i: &[f64]) -> Tensor[src]
pub fn from_record(&self, row: usize, record: &[f32]) -> Result<(), ()>[src]
pub fn swap(&self, o: Tensor)[src]
pub fn fill(size: &[usize], fill_value: f32) -> Tensor[src]
Returns a tensor of size size filled with fill_value.
pub fn fill_like() -> Tensor[src]
pub fn empty(shape: &[usize]) -> Tensor[src]
pub fn new_ones(dim: &[u32]) -> Tensor[src]
pub fn new_zeros(dim: &[u32]) -> Tensor[src]
pub fn zeros_like(&self) -> Tensor[src]
pub fn ones_like(&self) -> Tensor[src]
pub fn range(start: f64, step: f64) -> Tensor[src]
pub fn linespace(start: f64, end: f64, steps: u32) -> Tensor[src]
pub fn logspace(start: f64, end: f64, steps: u32, base: f64) -> Tensor[src]
pub fn eye(n: u32, m: u32) -> Tensor[src]
pub fn cat(&self, tensors: &[&Tensor], dim: usize) -> Tensor[src]
pub fn chunk()[src]
pub fn gather()[src]
pub fn index_select()[src]
pub fn masked_select()[src]
pub fn narrow()[src]
pub fn nonzero()[src]
pub fn reshape()[src]
pub fn split(&self, sections: &[usize], dim: usize) -> Vec<Tensor>[src]
pub fn squeeze()[src]
pub fn stack()[src]
pub fn t()[src]
pub fn take()[src]
pub fn transpose()[src]
pub fn unbind()[src]
pub fn permute(&self, dim: &[usize]) -> Tensor[src]
pub fn unsqueeze(&mut self, dim: &[usize]) -> &Tensor[src]
Returns a new tensor with a dimension of size one inserted at the specified position.
The returned tensor shares the same underlying data with this tensor.
pub fn condition()[src]
pub fn to_f64(&mut self)[src]
pub fn to_f32(&mut self)[src]
pub fn abs(&self) -> Tensor[src]
pub fn acos(&self) -> Tensor[src]
pub fn asin(&self) -> Tensor[src]
pub fn atan(&self) -> Tensor[src]
pub fn ceil(&self) -> Tensor[src]
pub fn cos(&self) -> Tensor[src]
pub fn cosh(&self) -> Tensor[src]
pub fn exp(&self) -> Tensor[src]
pub fn expm1(&self) -> Tensor[src]
pub fn floor(&self) -> Tensor[src]
pub fn frac(&self) -> Tensor[src]
pub fn lerp(&self, end: &Tensor, weight: f32) -> Tensor[src]
pub fn lerp_weights(&self, end: &Tensor, weight: &Tensor) -> Tensor[src]
pub fn log(&self) -> Tensor[src]
pub fn log10(&self) -> Tensor[src]
pub fn log1p(&self) -> Tensor[src]
pub fn log1pexp(&self) -> Tensor[src]
pub fn log2(&self) -> Tensor[src]
pub fn neg(&self) -> Tensor[src]
pub fn reciprocal(&self) -> Tensor[src]
pub fn round(&self) -> Tensor[src]
pub fn rsqrt(&self) -> Tensor[src]
pub fn sigmoid(&self) -> Tensor[src]
pub fn sign(&self) -> Tensor[src]
pub fn sin(&self) -> Tensor[src]
pub fn sinh(&self) -> Tensor[src]
pub fn sqrt(&self) -> Tensor[src]
pub fn square(&self) -> Tensor[src]
pub fn tan(&self) -> Tensor[src]
pub fn tanh(&self) -> Tensor[src]
pub fn trunc(&self) -> Tensor[src]
pub fn add(&self, o: &Tensor) -> Tensor[src]
pub fn sub(&self, o: &Tensor) -> Tensor[src]
pub fn mul(&self, o: &Tensor) -> Tensor[src]
pub fn div(&self, o: &Tensor) -> Tensor[src]
pub fn mm(&self, o: &Tensor) -> Tensor[src]
pub fn matmul(&self, o: &Tensor) -> Tensor[src]
pub fn outer(&self, o: &Tensor) -> Tensor[src]
pub fn mean(&self, dim: usize, keepdim: bool) -> Tensor[src]
pub fn std(&self, dim: usize, keepdim: bool) -> Tensor[src]
pub fn sum(&self) -> Tensor[src]
pub fn var(&self, dim: usize, keepdim: bool) -> Tensor[src]
pub fn normalize(&self, mean: &[f32], std: &[f32]) -> Tensor[src]
pub fn normalize_unit(&self) -> Tensor[src]
Trait Implementations
impl Clone for Tensor[src]
fn clone(&self) -> Self[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]
impl Debug for Tensor[src]
impl Display for Tensor[src]
impl Eq for Tensor[src]
impl PartialEq<Tensor> for Tensor[src]
Auto Trait Implementations
impl !RefUnwindSafe for Tensor
impl !Send for Tensor
impl !Sync for Tensor
impl Unpin for Tensor
impl !UnwindSafe for Tensor
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>,