[−][src]Struct auto_diff::tensor::Tensor
Methods
impl Tensor[src]
pub fn new() -> Tensor[src]
pub fn is_empty() -> bool[src]
pub fn from_vec_f32(input: &Vec<f32>, dim: &Vec<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: &Vec<f64>) -> Tensor[src]
pub fn full() -> Tensor[src]
pub fn full_like() -> Tensor[src]
pub fn empty() -> Tensor[src]
pub fn new_ones(dim: &Vec<u32>) -> Tensor[src]
pub fn new_zeros(dim: &Vec<u32>) -> Tensor[src]
pub fn zeros_like(o: &Tensor) -> Tensor[src]
pub fn ones_like(o: &Tensor) -> 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()[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()[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 unsqueeze()[src]
pub fn condition()[src]
pub fn to_f64(&mut self)[src]
pub fn to_f32(&mut self)[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]
Trait Implementations
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> 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>,