pub struct TensorBase<T = f64> { /* private fields */ }
Implementations§
Source§impl<T> TensorBase<T>
impl<T> TensorBase<T>
Sourcepub fn from_iter<I>(iter: I) -> TensorBase<T>where
I: IntoIterator<Item = T>,
pub fn from_iter<I>(iter: I) -> TensorBase<T>where
I: IntoIterator<Item = T>,
Create a new tensor from an iterator.
pub unsafe fn from_raw_parts( ptr: *mut T, shape: impl IntoShape, stride: impl IntoStride, ) -> TensorBase<T>
Sourcepub fn from_scalar(value: T) -> TensorBase<T>
pub fn from_scalar(value: T) -> TensorBase<T>
Create a new tensor from a scalar value.
Sourcepub fn from_shape_iter<I>(shape: impl IntoShape, iter: I) -> TensorBase<T>where
I: IntoIterator<Item = T>,
pub fn from_shape_iter<I>(shape: impl IntoShape, iter: I) -> TensorBase<T>where
I: IntoIterator<Item = T>,
Create a new tensor from an iterator, with a particular shape.
pub unsafe fn from_shape_ptr( shape: impl IntoShape, ptr: *mut T, ) -> TensorBase<T>
Sourcepub fn from_shape_vec(shape: impl IntoShape, data: Vec<T>) -> TensorBase<T>
pub fn from_shape_vec(shape: impl IntoShape, data: Vec<T>) -> TensorBase<T>
Sourcepub fn from_vec(data: Vec<T>) -> TensorBase<T>
pub fn from_vec(data: Vec<T>) -> TensorBase<T>
Create a new, one-dimensional tensor from a Vec.
Sourcepub fn as_mut_ptr(&mut self) -> *mut T
pub fn as_mut_ptr(&mut self) -> *mut T
Return a mutable pointer to the tensor’s data.
Sourcepub fn as_mut_slice(&mut self) -> &mut [T]
pub fn as_mut_slice(&mut self) -> &mut [T]
Return a mutable reference to the tensor’s data.
Sourcepub fn assign(&mut self, other: &TensorBase<T>)where
T: Clone,
pub fn assign(&mut self, other: &TensorBase<T>)where
T: Clone,
Assign the values of another tensor to this tensor.
pub fn boxed(self) -> Box<TensorBase<T>>
Sourcepub fn detach(&self) -> TensorBase<T>where
T: Clone,
pub fn detach(&self) -> TensorBase<T>where
T: Clone,
Detach the computational graph from the tensor
Sourcepub fn first_mut(&mut self) -> Option<&mut T>
pub fn first_mut(&mut self) -> Option<&mut T>
Returns a mutable reference to the first element of the tensor.
Sourcepub fn get(&self, index: impl AsRef<[usize]>) -> Option<&T>
pub fn get(&self, index: impl AsRef<[usize]>) -> Option<&T>
Returns the data at the specified index.
Sourcepub fn get_mut(&mut self, index: impl AsRef<[usize]>) -> Option<&mut T>
pub fn get_mut(&mut self, index: impl AsRef<[usize]>) -> Option<&mut T>
Returns a mutable reference to the data at the specified index.
pub unsafe fn into_scalar(self) -> Twhere
T: Clone,
Sourcepub fn is_contiguous(&self) -> bool
pub fn is_contiguous(&self) -> bool
Returns true if the tensor is contiguous.
Sourcepub const fn is_variable(&self) -> bool
pub const fn is_variable(&self) -> bool
A function to check if the tensor is a variable
Sourcepub fn iter(&self) -> Iter<'_, T> ⓘ
pub fn iter(&self) -> Iter<'_, T> ⓘ
Creates an immutable iterator over the elements in the tensor.
Sourcepub fn iter_mut(&mut self) -> IterMut<'_, T> ⓘ
pub fn iter_mut(&mut self) -> IterMut<'_, T> ⓘ
Create a mutable iterator over the elements in the tensor.
Sourcepub const fn kind(&self) -> TensorKind
pub const fn kind(&self) -> TensorKind
Get the kind of the tensor
Sourcepub fn last_mut(&mut self) -> Option<&mut T>
pub fn last_mut(&mut self) -> Option<&mut T>
Get a mutable reference to the last element of the tensor
Sourcepub const fn op(&self) -> &BackpropOp<T>
pub const fn op(&self) -> &BackpropOp<T>
Get a reference to the operation of the tensor
Sourcepub fn op_view(&self) -> BackpropOp<&T>
pub fn op_view(&self) -> BackpropOp<&T>
Get a reference to the operation of the tensor
Sourcepub fn set(&mut self, index: impl AsRef<[usize]>, value: T)
pub fn set(&mut self, index: impl AsRef<[usize]>, value: T)
Set the value of the tensor at the specified index
Sourcepub fn to_scalar(&self) -> Result<&T, TensorError>
pub fn to_scalar(&self) -> Result<&T, TensorError>
Turn the tensor into a scalar If the tensor has a rank greater than 0, this will return an error
Sourcepub fn variable(self) -> TensorBase<T>
pub fn variable(self) -> TensorBase<T>
Changes the kind of tensor to a variable
Sourcepub fn with_layout(self, layout: Layout) -> TensorBase<T>
pub fn with_layout(self, layout: Layout) -> TensorBase<T>
Set the layout of the tensor
Sourcepub unsafe fn with_layout_unchecked(self, layout: Layout) -> TensorBase<T>
pub unsafe fn with_layout_unchecked(self, layout: Layout) -> TensorBase<T>
Set the layout of the tensor without checking for compatibility
§Safety
This function is unsafe because it does not check if the layout is compatible with the tensor.
pub fn with_op(self, op: BackpropOp<T>) -> TensorBase<T>
pub fn with_shape_c(self, shape: impl IntoShape) -> TensorBase<T>
Source§impl<T> TensorBase<T>
impl<T> TensorBase<T>
pub fn view_from_scalar(scalar: &T) -> TensorBase<&T>
pub fn to_owned(&self) -> TensorBase<T>where
T: Clone,
pub fn view(&self) -> TensorBase<&T>
pub fn view_mut(&mut self) -> TensorBase<&mut T>
Source§impl<T> TensorBase<T>
impl<T> TensorBase<T>
Source§impl<T> TensorBase<T>where
T: Scalar,
impl<T> TensorBase<T>where
T: Scalar,
pub fn apply_binary(&self, other: &TensorBase<T>, op: BinaryOp) -> TensorBase<T>
pub fn apply_binaryf<F>(
&self,
other: &TensorBase<T>,
op: BinaryOp,
f: F,
) -> TensorBase<T>where
F: Fn(T, T) -> T,
Source§impl<T> TensorBase<T>
impl<T> TensorBase<T>
pub fn pow(&self, exp: T) -> TensorBase<T>
pub fn powf(&self, exp: T) -> TensorBase<T>where
T: Float,
pub fn powi(&self, exp: i32) -> TensorBase<T>where
T: FloatCore,
Source§impl<T> TensorBase<T>where
T: Scalar,
impl<T> TensorBase<T>where
T: Scalar,
pub fn add(&self, other: &TensorBase<T>) -> TensorBase<T>
pub fn add_scalar(&self, other: T) -> TensorBase<T>
Source§impl<T> TensorBase<T>where
T: Scalar,
impl<T> TensorBase<T>where
T: Scalar,
pub fn abs(&self) -> TensorBase<<T as Scalar>::Real>where
T: Scalar<Real = T>,
pub fn sigmoid(&self) -> TensorBase<T>where
T: ScalarExt,
pub fn cos(&self) -> TensorBase<T>
pub fn cosh(&self) -> TensorBase<T>
pub fn exp(&self) -> TensorBase<T>
pub fn ln(&self) -> TensorBase<T>
pub fn recip(&self) -> TensorBase<T>
pub fn sin(&self) -> TensorBase<T>
pub fn sinh(&self) -> TensorBase<T>
pub fn sqr(&self) -> TensorBase<T>
pub fn sqrt(&self) -> TensorBase<T>
pub fn tan(&self) -> TensorBase<T>
pub fn tanh(&self) -> TensorBase<T>
Source§impl<T> TensorBase<T>where
T: Clone,
impl<T> TensorBase<T>where
T: Clone,
Sourcepub fn default_like(&self) -> TensorBase<T>where
T: Default,
pub fn default_like(&self) -> TensorBase<T>where
T: Default,
Create a new tensor, whose elements are set to their default value from the current shape.
Sourcepub fn empty(shape: impl IntoShape) -> TensorBase<T>where
T: Default,
pub fn empty(shape: impl IntoShape) -> TensorBase<T>where
T: Default,
Create an empty tensor from the given shape
Sourcepub fn fill(shape: impl IntoShape, value: T) -> TensorBase<T>
pub fn fill(shape: impl IntoShape, value: T) -> TensorBase<T>
Create a tensor, from the given shape, filled with the given value
Sourcepub fn fill_like(&self, value: T) -> TensorBase<T>
pub fn fill_like(&self, value: T) -> TensorBase<T>
Create a tensor, filled with some value, from the current shape
pub fn like_with(&self, data: Vec<T>) -> TensorBase<T>
Source§impl<T> TensorBase<T>
impl<T> TensorBase<T>
Sourcepub fn arange(start: T, end: T, step: T) -> TensorBase<T>
pub fn arange(start: T, end: T, step: T) -> TensorBase<T>
Create a tensor within a range of values
Sourcepub fn eye(size: usize) -> TensorBase<T>
pub fn eye(size: usize) -> TensorBase<T>
Create an identity matrix of a certain size
Sourcepub fn linspace(start: T, end: T, steps: usize) -> TensorBase<T>where
T: FromPrimitive,
pub fn linspace(start: T, end: T, steps: usize) -> TensorBase<T>where
T: FromPrimitive,
Create a tensor with a certain number of elements, evenly spaced between the provided start and end values
pub fn logspace(start: T, end: T, steps: usize) -> TensorBase<T>where
T: Real,
pub fn geomspace(start: T, end: T, steps: usize) -> TensorBase<T>where
T: Real,
Source§impl<T> TensorBase<T>
impl<T> TensorBase<T>
Sourcepub fn ones(shape: impl IntoShape) -> TensorBase<T>
pub fn ones(shape: impl IntoShape) -> TensorBase<T>
Create a tensor, filled with ones, from the given shape
Sourcepub fn ones_from(tensor: &TensorBase<T>) -> TensorBase<T>
pub fn ones_from(tensor: &TensorBase<T>) -> TensorBase<T>
Create a tensor, filled with ones, from the shape of another tensor
Sourcepub fn ones_like(&self) -> TensorBase<T>
pub fn ones_like(&self) -> TensorBase<T>
Create a tensor, filled with ones, from the shape of the tensor
Source§impl<T> TensorBase<T>
impl<T> TensorBase<T>
Sourcepub fn zeros(shape: impl IntoShape) -> TensorBase<T>
pub fn zeros(shape: impl IntoShape) -> TensorBase<T>
Create a tensor, filled with zeros, from the given shape
Sourcepub fn zeros_from(tensor: &TensorBase<T>) -> TensorBase<T>
pub fn zeros_from(tensor: &TensorBase<T>) -> TensorBase<T>
Create a tensor, filled with zeros, from the shape of another tensor
Sourcepub fn zeros_like(&self) -> TensorBase<T>
pub fn zeros_like(&self) -> TensorBase<T>
Create a tensor, filled with zeros, from the shape of the tensor
Source§impl<T> TensorBase<T>where
T: ScalarExt,
impl<T> TensorBase<T>where
T: ScalarExt,
Sourcepub fn grad(&self) -> Result<TensorGrad<T>, TensorError>
pub fn grad(&self) -> Result<TensorGrad<T>, TensorError>
Compute the gradient of the tensor
Source§impl<T> TensorBase<T>where
T: Copy,
impl<T> TensorBase<T>where
T: Copy,
Source§impl<T> TensorBase<T>where
T: Copy,
impl<T> TensorBase<T>where
T: Copy,
Sourcepub fn diag(&self) -> TensorBase<T>
pub fn diag(&self) -> TensorBase<T>
Creates a new tensor containing only the diagonal elements of the original tensor.
Sourcepub fn inv(&self) -> Result<TensorBase<T>, TensorError>where
T: NumAssign + PartialOrd,
pub fn inv(&self) -> Result<TensorBase<T>, TensorError>where
T: NumAssign + PartialOrd,
Find the inverse of the tensor
§Errors
Returns an error if the matrix is not square or if the matrix is singular.
Sourcepub fn trace(&self) -> Result<T, TensorError>where
T: Num,
pub fn trace(&self) -> Result<T, TensorError>where
T: Num,
Compute the trace of the matrix. The trace of a matrix is the sum of the diagonal elements.
Source§impl<T> TensorBase<T>where
T: Clone,
impl<T> TensorBase<T>where
T: Clone,
Sourcepub fn broadcast(&self, shape: impl IntoShape) -> TensorBase<T>
pub fn broadcast(&self, shape: impl IntoShape) -> TensorBase<T>
coerce the tensor to act like a larger shape. This method doesn’t change the underlying data, but it does change the layout.
Sourcepub fn swap_axes(&self, swap: Axis, with: Axis) -> TensorBase<T>
pub fn swap_axes(&self, swap: Axis, with: Axis) -> TensorBase<T>
Swap two axes in the tensor.
Sourcepub fn t(&self) -> TensorBase<T>
pub fn t(&self) -> TensorBase<T>
Transpose the tensor.
Sourcepub fn reshape(
self,
shape: impl IntoShape,
) -> Result<TensorBase<T>, TensorError>
pub fn reshape( self, shape: impl IntoShape, ) -> Result<TensorBase<T>, TensorError>
Reshape the tensor returns an error if the new shape specifies a different number of elements.
Trait Implementations§
Source§impl<'a, 'b, T> Add<&'b TensorBase<T>> for &'a TensorBase<T>
impl<'a, 'b, T> Add<&'b TensorBase<T>> for &'a TensorBase<T>
Source§type Output = TensorBase<T>
type Output = TensorBase<T>
+
operator.Source§fn add(
self,
other: &'b TensorBase<T>,
) -> <&'a TensorBase<T> as Add<&'b TensorBase<T>>>::Output
fn add( self, other: &'b TensorBase<T>, ) -> <&'a TensorBase<T> as Add<&'b TensorBase<T>>>::Output
+
operation. Read moreSource§impl<'a, T> Add<&'a TensorBase<T>> for TensorBase<T>
impl<'a, T> Add<&'a TensorBase<T>> for TensorBase<T>
Source§type Output = TensorBase<T>
type Output = TensorBase<T>
+
operator.Source§fn add(
self,
other: &'a TensorBase<T>,
) -> <TensorBase<T> as Add<&'a TensorBase<T>>>::Output
fn add( self, other: &'a TensorBase<T>, ) -> <TensorBase<T> as Add<&'a TensorBase<T>>>::Output
+
operation. Read moreSource§impl<'a, T> Add<T> for &'a TensorBase<T>
impl<'a, T> Add<T> for &'a TensorBase<T>
Source§impl<T> Add<T> for TensorBase<T>
impl<T> Add<T> for TensorBase<T>
Source§impl<'a, T> Add<TensorBase<T>> for &'a TensorBase<T>
impl<'a, T> Add<TensorBase<T>> for &'a TensorBase<T>
Source§type Output = TensorBase<T>
type Output = TensorBase<T>
+
operator.Source§fn add(
self,
other: TensorBase<T>,
) -> <&'a TensorBase<T> as Add<TensorBase<T>>>::Output
fn add( self, other: TensorBase<T>, ) -> <&'a TensorBase<T> as Add<TensorBase<T>>>::Output
+
operation. Read moreSource§impl<T> Add for TensorBase<T>
impl<T> Add for TensorBase<T>
Source§type Output = TensorBase<T>
type Output = TensorBase<T>
+
operator.Source§fn add(self, other: TensorBase<T>) -> <TensorBase<T> as Add>::Output
fn add(self, other: TensorBase<T>) -> <TensorBase<T> as Add>::Output
+
operation. Read moreSource§impl<'a, T> AddAssign<&'a TensorBase<T>> for TensorBase<T>
impl<'a, T> AddAssign<&'a TensorBase<T>> for TensorBase<T>
Source§fn add_assign(&mut self, other: &'a TensorBase<T>)
fn add_assign(&mut self, other: &'a TensorBase<T>)
+=
operation. Read moreSource§impl<T> AddAssign for TensorBase<T>
impl<T> AddAssign for TensorBase<T>
Source§fn add_assign(&mut self, other: TensorBase<T>)
fn add_assign(&mut self, other: TensorBase<T>)
+=
operation. Read moreSource§impl<'a, T> AsRef<TensorBase<T>> for TensorBase<&'a T>
impl<'a, T> AsRef<TensorBase<T>> for TensorBase<&'a T>
Source§fn as_ref(&self) -> &TensorBase<T>
fn as_ref(&self) -> &TensorBase<T>
Source§impl<T> Clone for TensorBase<T>where
T: Clone,
impl<T> Clone for TensorBase<T>where
T: Clone,
Source§fn clone(&self) -> TensorBase<T>
fn clone(&self) -> TensorBase<T>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl<T> Debug for TensorBase<T>where
T: Debug,
impl<T> Debug for TensorBase<T>where
T: Debug,
Source§impl<'de, T> Deserialize<'de> for TensorBase<T>where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for TensorBase<T>where
T: Deserialize<'de>,
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<TensorBase<T>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<TensorBase<T>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl<'a, 'b, T> Div<&'b TensorBase<T>> for &'a TensorBase<T>
impl<'a, 'b, T> Div<&'b TensorBase<T>> for &'a TensorBase<T>
Source§type Output = TensorBase<T>
type Output = TensorBase<T>
/
operator.Source§fn div(
self,
other: &'b TensorBase<T>,
) -> <&'a TensorBase<T> as Div<&'b TensorBase<T>>>::Output
fn div( self, other: &'b TensorBase<T>, ) -> <&'a TensorBase<T> as Div<&'b TensorBase<T>>>::Output
/
operation. Read moreSource§impl<'a, T> Div<&'a TensorBase<T>> for TensorBase<T>
impl<'a, T> Div<&'a TensorBase<T>> for TensorBase<T>
Source§type Output = TensorBase<T>
type Output = TensorBase<T>
/
operator.Source§fn div(
self,
other: &'a TensorBase<T>,
) -> <TensorBase<T> as Div<&'a TensorBase<T>>>::Output
fn div( self, other: &'a TensorBase<T>, ) -> <TensorBase<T> as Div<&'a TensorBase<T>>>::Output
/
operation. Read moreSource§impl<'a, T> Div<T> for &'a TensorBase<T>
impl<'a, T> Div<T> for &'a TensorBase<T>
Source§impl<T> Div<T> for TensorBase<T>
impl<T> Div<T> for TensorBase<T>
Source§impl<'a, T> Div<TensorBase<T>> for &'a TensorBase<T>
impl<'a, T> Div<TensorBase<T>> for &'a TensorBase<T>
Source§type Output = TensorBase<T>
type Output = TensorBase<T>
/
operator.Source§fn div(
self,
other: TensorBase<T>,
) -> <&'a TensorBase<T> as Div<TensorBase<T>>>::Output
fn div( self, other: TensorBase<T>, ) -> <&'a TensorBase<T> as Div<TensorBase<T>>>::Output
/
operation. Read moreSource§impl<T> Div for TensorBase<T>
impl<T> Div for TensorBase<T>
Source§type Output = TensorBase<T>
type Output = TensorBase<T>
/
operator.Source§fn div(self, other: TensorBase<T>) -> <TensorBase<T> as Div>::Output
fn div(self, other: TensorBase<T>) -> <TensorBase<T> as Div>::Output
/
operation. Read moreSource§impl<'a, T> DivAssign<&'a TensorBase<T>> for TensorBase<T>
impl<'a, T> DivAssign<&'a TensorBase<T>> for TensorBase<T>
Source§fn div_assign(&mut self, other: &'a TensorBase<T>)
fn div_assign(&mut self, other: &'a TensorBase<T>)
/=
operation. Read moreSource§impl<T> DivAssign for TensorBase<T>
impl<T> DivAssign for TensorBase<T>
Source§fn div_assign(&mut self, other: TensorBase<T>)
fn div_assign(&mut self, other: TensorBase<T>)
/=
operation. Read moreSource§impl<'a, T> From<&'a TensorBase<T>> for Iter<'a, T>
impl<'a, T> From<&'a TensorBase<T>> for Iter<'a, T>
Source§impl<T> From<TensorBase<T>> for Tensors<T>where
T: Clone,
impl<T> From<TensorBase<T>> for Tensors<T>where
T: Clone,
Source§fn from(tensor: TensorBase<T>) -> Tensors<T>
fn from(tensor: TensorBase<T>) -> Tensors<T>
Source§impl<T> FromIterator<T> for TensorBase<T>
impl<T> FromIterator<T> for TensorBase<T>
Source§fn from_iter<I>(iter: I) -> TensorBase<T>where
I: IntoIterator<Item = T>,
fn from_iter<I>(iter: I) -> TensorBase<T>where
I: IntoIterator<Item = T>,
Source§impl<T> Hash for TensorBase<T>where
T: Hash,
impl<T> Hash for TensorBase<T>where
T: Hash,
Source§impl<Idx, T> Index<Idx> for TensorBase<T>
impl<Idx, T> Index<Idx> for TensorBase<T>
Source§impl<Idx, T> IndexMut<Idx> for TensorBase<T>
impl<Idx, T> IndexMut<Idx> for TensorBase<T>
Source§impl<T> IntoIterator for TensorBase<T>
impl<T> IntoIterator for TensorBase<T>
Source§impl<T> Inverse for TensorBase<T>
impl<T> Inverse for TensorBase<T>
type Output = Result<TensorBase<T>, TensorError>
fn inv(&self) -> <TensorBase<T> as Inverse>::Output
Source§impl<T> Matmul for TensorBase<T>where
T: Scalar,
impl<T> Matmul for TensorBase<T>where
T: Scalar,
type Output = TensorBase<T>
fn matmul(&self, other: &TensorBase<T>) -> TensorBase<T>
Source§impl<'a, 'b, T> Mul<&'b TensorBase<T>> for &'a TensorBase<T>
impl<'a, 'b, T> Mul<&'b TensorBase<T>> for &'a TensorBase<T>
Source§type Output = TensorBase<T>
type Output = TensorBase<T>
*
operator.Source§fn mul(
self,
other: &'b TensorBase<T>,
) -> <&'a TensorBase<T> as Mul<&'b TensorBase<T>>>::Output
fn mul( self, other: &'b TensorBase<T>, ) -> <&'a TensorBase<T> as Mul<&'b TensorBase<T>>>::Output
*
operation. Read moreSource§impl<'a, T> Mul<&'a TensorBase<T>> for TensorBase<T>
impl<'a, T> Mul<&'a TensorBase<T>> for TensorBase<T>
Source§type Output = TensorBase<T>
type Output = TensorBase<T>
*
operator.Source§fn mul(
self,
other: &'a TensorBase<T>,
) -> <TensorBase<T> as Mul<&'a TensorBase<T>>>::Output
fn mul( self, other: &'a TensorBase<T>, ) -> <TensorBase<T> as Mul<&'a TensorBase<T>>>::Output
*
operation. Read moreSource§impl<'a, T> Mul<T> for &'a TensorBase<T>
impl<'a, T> Mul<T> for &'a TensorBase<T>
Source§impl<T> Mul<T> for TensorBase<T>
impl<T> Mul<T> for TensorBase<T>
Source§impl<'a, T> Mul<TensorBase<T>> for &'a TensorBase<T>
impl<'a, T> Mul<TensorBase<T>> for &'a TensorBase<T>
Source§type Output = TensorBase<T>
type Output = TensorBase<T>
*
operator.Source§fn mul(
self,
other: TensorBase<T>,
) -> <&'a TensorBase<T> as Mul<TensorBase<T>>>::Output
fn mul( self, other: TensorBase<T>, ) -> <&'a TensorBase<T> as Mul<TensorBase<T>>>::Output
*
operation. Read moreSource§impl<T> Mul for TensorBase<T>
impl<T> Mul for TensorBase<T>
Source§type Output = TensorBase<T>
type Output = TensorBase<T>
*
operator.Source§fn mul(self, other: TensorBase<T>) -> <TensorBase<T> as Mul>::Output
fn mul(self, other: TensorBase<T>) -> <TensorBase<T> as Mul>::Output
*
operation. Read moreSource§impl<'a, T> MulAssign<&'a TensorBase<T>> for TensorBase<T>
impl<'a, T> MulAssign<&'a TensorBase<T>> for TensorBase<T>
Source§fn mul_assign(&mut self, other: &'a TensorBase<T>)
fn mul_assign(&mut self, other: &'a TensorBase<T>)
*=
operation. Read moreSource§impl<T> MulAssign for TensorBase<T>
impl<T> MulAssign for TensorBase<T>
Source§fn mul_assign(&mut self, other: TensorBase<T>)
fn mul_assign(&mut self, other: TensorBase<T>)
*=
operation. Read moreSource§impl<'a, T> Neg for &'a TensorBase<T>
impl<'a, T> Neg for &'a TensorBase<T>
Source§impl<T> Neg for TensorBase<T>
impl<T> Neg for TensorBase<T>
Source§impl<'a, T> Not for &'a TensorBase<T>
impl<'a, T> Not for &'a TensorBase<T>
Source§impl<T> Not for TensorBase<T>
impl<T> Not for TensorBase<T>
Source§impl<T> Num for TensorBase<T>
impl<T> Num for TensorBase<T>
type FromStrRadixErr = <T as Num>::FromStrRadixErr
Source§fn from_str_radix(
str: &str,
radix: u32,
) -> Result<TensorBase<T>, <TensorBase<T> as Num>::FromStrRadixErr>
fn from_str_radix( str: &str, radix: u32, ) -> Result<TensorBase<T>, <TensorBase<T> as Num>::FromStrRadixErr>
2..=36
). Read moreSource§impl<T> One for TensorBase<T>
impl<T> One for TensorBase<T>
Source§fn one() -> TensorBase<T>
fn one() -> TensorBase<T>
Source§impl<T> Ord for TensorBase<T>where
T: Ord,
impl<T> Ord for TensorBase<T>where
T: Ord,
Source§fn cmp(&self, other: &TensorBase<T>) -> Ordering
fn cmp(&self, other: &TensorBase<T>) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl<S, T> PartialEq<S> for TensorBase<T>
impl<S, T> PartialEq<S> for TensorBase<T>
Source§impl<T> PartialEq for TensorBase<T>where
T: PartialEq,
impl<T> PartialEq for TensorBase<T>where
T: PartialEq,
Source§impl<T> PartialOrd for TensorBase<T>where
T: PartialOrd,
impl<T> PartialOrd for TensorBase<T>where
T: PartialOrd,
Source§impl<'a, T> Pow<T> for &'a TensorBase<T>
impl<'a, T> Pow<T> for &'a TensorBase<T>
Source§impl<T> Pow<T> for TensorBase<T>
impl<T> Pow<T> for TensorBase<T>
Source§impl<'a, 'b, T> Rem<&'b TensorBase<T>> for &'a TensorBase<T>
impl<'a, 'b, T> Rem<&'b TensorBase<T>> for &'a TensorBase<T>
Source§type Output = TensorBase<T>
type Output = TensorBase<T>
%
operator.Source§fn rem(
self,
other: &'b TensorBase<T>,
) -> <&'a TensorBase<T> as Rem<&'b TensorBase<T>>>::Output
fn rem( self, other: &'b TensorBase<T>, ) -> <&'a TensorBase<T> as Rem<&'b TensorBase<T>>>::Output
%
operation. Read moreSource§impl<'a, T> Rem<&'a TensorBase<T>> for TensorBase<T>
impl<'a, T> Rem<&'a TensorBase<T>> for TensorBase<T>
Source§type Output = TensorBase<T>
type Output = TensorBase<T>
%
operator.Source§fn rem(
self,
other: &'a TensorBase<T>,
) -> <TensorBase<T> as Rem<&'a TensorBase<T>>>::Output
fn rem( self, other: &'a TensorBase<T>, ) -> <TensorBase<T> as Rem<&'a TensorBase<T>>>::Output
%
operation. Read moreSource§impl<'a, T> Rem<T> for &'a TensorBase<T>
impl<'a, T> Rem<T> for &'a TensorBase<T>
Source§impl<T> Rem<T> for TensorBase<T>
impl<T> Rem<T> for TensorBase<T>
Source§impl<'a, T> Rem<TensorBase<T>> for &'a TensorBase<T>
impl<'a, T> Rem<TensorBase<T>> for &'a TensorBase<T>
Source§type Output = TensorBase<T>
type Output = TensorBase<T>
%
operator.Source§fn rem(
self,
other: TensorBase<T>,
) -> <&'a TensorBase<T> as Rem<TensorBase<T>>>::Output
fn rem( self, other: TensorBase<T>, ) -> <&'a TensorBase<T> as Rem<TensorBase<T>>>::Output
%
operation. Read moreSource§impl<T> Rem for TensorBase<T>
impl<T> Rem for TensorBase<T>
Source§type Output = TensorBase<T>
type Output = TensorBase<T>
%
operator.Source§fn rem(self, other: TensorBase<T>) -> <TensorBase<T> as Rem>::Output
fn rem(self, other: TensorBase<T>) -> <TensorBase<T> as Rem>::Output
%
operation. Read moreSource§impl<'a, T> RemAssign<&'a TensorBase<T>> for TensorBase<T>
impl<'a, T> RemAssign<&'a TensorBase<T>> for TensorBase<T>
Source§fn rem_assign(&mut self, other: &'a TensorBase<T>)
fn rem_assign(&mut self, other: &'a TensorBase<T>)
%=
operation. Read moreSource§impl<T> RemAssign for TensorBase<T>
impl<T> RemAssign for TensorBase<T>
Source§fn rem_assign(&mut self, other: TensorBase<T>)
fn rem_assign(&mut self, other: TensorBase<T>)
%=
operation. Read moreSource§impl<T> Serialize for TensorBase<T>where
T: Serialize,
impl<T> Serialize for TensorBase<T>where
T: Serialize,
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Source§impl<T> Statistics<T> for TensorBase<T>
impl<T> Statistics<T> for TensorBase<T>
Source§impl<T> Store<TensorId, TensorBase<T>> for TensorGrad<T>
impl<T> Store<TensorId, TensorBase<T>> for TensorGrad<T>
fn get(&self, key: &TensorId) -> Option<&TensorBase<T>>
fn get_mut(&mut self, key: &TensorId) -> Option<&mut TensorBase<T>>
fn insert( &mut self, key: TensorId, value: TensorBase<T>, ) -> Option<TensorBase<T>>
fn remove(&mut self, key: &TensorId) -> Option<TensorBase<T>>
Source§impl<'a, 'b, T> Sub<&'b TensorBase<T>> for &'a TensorBase<T>
impl<'a, 'b, T> Sub<&'b TensorBase<T>> for &'a TensorBase<T>
Source§type Output = TensorBase<T>
type Output = TensorBase<T>
-
operator.Source§fn sub(
self,
other: &'b TensorBase<T>,
) -> <&'a TensorBase<T> as Sub<&'b TensorBase<T>>>::Output
fn sub( self, other: &'b TensorBase<T>, ) -> <&'a TensorBase<T> as Sub<&'b TensorBase<T>>>::Output
-
operation. Read moreSource§impl<'a, T> Sub<&'a TensorBase<T>> for TensorBase<T>
impl<'a, T> Sub<&'a TensorBase<T>> for TensorBase<T>
Source§type Output = TensorBase<T>
type Output = TensorBase<T>
-
operator.Source§fn sub(
self,
other: &'a TensorBase<T>,
) -> <TensorBase<T> as Sub<&'a TensorBase<T>>>::Output
fn sub( self, other: &'a TensorBase<T>, ) -> <TensorBase<T> as Sub<&'a TensorBase<T>>>::Output
-
operation. Read moreSource§impl<'a, T> Sub<T> for &'a TensorBase<T>
impl<'a, T> Sub<T> for &'a TensorBase<T>
Source§impl<T> Sub<T> for TensorBase<T>
impl<T> Sub<T> for TensorBase<T>
Source§impl<'a, T> Sub<TensorBase<T>> for &'a TensorBase<T>
impl<'a, T> Sub<TensorBase<T>> for &'a TensorBase<T>
Source§type Output = TensorBase<T>
type Output = TensorBase<T>
-
operator.Source§fn sub(
self,
other: TensorBase<T>,
) -> <&'a TensorBase<T> as Sub<TensorBase<T>>>::Output
fn sub( self, other: TensorBase<T>, ) -> <&'a TensorBase<T> as Sub<TensorBase<T>>>::Output
-
operation. Read moreSource§impl<T> Sub for TensorBase<T>
impl<T> Sub for TensorBase<T>
Source§type Output = TensorBase<T>
type Output = TensorBase<T>
-
operator.Source§fn sub(self, other: TensorBase<T>) -> <TensorBase<T> as Sub>::Output
fn sub(self, other: TensorBase<T>) -> <TensorBase<T> as Sub>::Output
-
operation. Read moreSource§impl<'a, T> SubAssign<&'a TensorBase<T>> for TensorBase<T>
impl<'a, T> SubAssign<&'a TensorBase<T>> for TensorBase<T>
Source§fn sub_assign(&mut self, other: &'a TensorBase<T>)
fn sub_assign(&mut self, other: &'a TensorBase<T>)
-=
operation. Read moreSource§impl<T> SubAssign for TensorBase<T>
impl<T> SubAssign for TensorBase<T>
Source§fn sub_assign(&mut self, other: TensorBase<T>)
fn sub_assign(&mut self, other: TensorBase<T>)
-=
operation. Read moreSource§impl<T> Zero for TensorBase<T>
impl<T> Zero for TensorBase<T>
impl<T> Eq for TensorBase<T>where
T: Eq,
Auto Trait Implementations§
impl<T> Freeze for TensorBase<T>where
T: Freeze,
impl<T> RefUnwindSafe for TensorBase<T>where
T: RefUnwindSafe,
impl<T> Send for TensorBase<T>where
T: Send,
impl<T> Sync for TensorBase<T>where
T: Sync,
impl<T> Unpin for TensorBase<T>where
T: Unpin,
impl<T> UnwindSafe for TensorBase<T>where
T: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.