#[non_exhaustive]pub enum TensorExpr<A, B = A> {
Binary(BoxTensor<A>, BoxTensor<B>, BinaryOp),
BinaryScalar(BoxTensor<A>, B, BinaryOp),
Unary(BoxTensor<A>, UnaryOp),
Matmul(BoxTensor<A>, BoxTensor<B>),
Sigmoid(BoxTensor<A>),
Shape(ReshapeExpr<A>),
}Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Binary(BoxTensor<A>, BoxTensor<B>, BinaryOp)
BinaryScalar(BoxTensor<A>, B, BinaryOp)
Unary(BoxTensor<A>, UnaryOp)
Matmul(BoxTensor<A>, BoxTensor<B>)
Sigmoid(BoxTensor<A>)
Shape(ReshapeExpr<A>)
Implementations§
Source§impl<A, B> TensorExpr<A, B>
impl<A, B> TensorExpr<A, B>
pub fn binary(lhs: TensorBase<A>, rhs: TensorBase<B>, op: BinaryOp) -> Self
pub fn binary_scalar(lhs: TensorBase<A>, rhs: B, op: BinaryOp) -> Self
pub fn binary_scalar_c( lhs: TensorBase<A>, rhs: Complex<A>, op: BinaryOp, ) -> TensorExpr<A, Complex<A>>
pub fn broadcast(tensor: TensorBase<A>, shape: Shape) -> Self
pub fn matmul(lhs: TensorBase<A>, rhs: TensorBase<B>) -> Self
pub fn reshape(tensor: TensorBase<A>, shape: Shape) -> Self
pub fn shape(expr: ReshapeExpr<A>) -> Self
pub fn sigmoid(tensor: TensorBase<A>) -> Self
pub fn swap_axes(tensor: TensorBase<A>, swap: Axis, with: Axis) -> Self
pub fn transpose(tensor: TensorBase<A>) -> Self
pub fn unary(tensor: TensorBase<A>, op: UnaryOp) -> Self
pub fn lhs(self) -> Option<TensorBase<A>>
pub fn rhs(self) -> Option<TensorBase<B>>
pub fn view(&self) -> TensorExpr<&A, &B>
pub fn view_mut(&mut self) -> TensorExpr<&mut A, &mut B>
Trait Implementations§
Source§impl<A: Clone, B: Clone> Clone for TensorExpr<A, B>
impl<A: Clone, B: Clone> Clone for TensorExpr<A, B>
Source§fn clone(&self) -> TensorExpr<A, B>
fn clone(&self) -> TensorExpr<A, B>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'de, A, B> Deserialize<'de> for TensorExpr<A, B>where
A: Deserialize<'de>,
B: Deserialize<'de>,
impl<'de, A, B> Deserialize<'de> for TensorExpr<A, B>where
A: Deserialize<'de>,
B: Deserialize<'de>,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<A, B> From<ReshapeExpr<A>> for TensorExpr<A, B>
impl<A, B> From<ReshapeExpr<A>> for TensorExpr<A, B>
Source§fn from(expr: ReshapeExpr<A>) -> Self
fn from(expr: ReshapeExpr<A>) -> Self
Converts to this type from the input type.
Source§impl<T> From<TensorExpr<T>> for BackpropOp<T>
impl<T> From<TensorExpr<T>> for BackpropOp<T>
Source§fn from(op: TensorExpr<T>) -> Self
fn from(op: TensorExpr<T>) -> Self
Converts to this type from the input type.
Source§impl<A, B> Serialize for TensorExpr<A, B>
impl<A, B> Serialize for TensorExpr<A, B>
impl<A: Eq, B: Eq> Eq for TensorExpr<A, B>
impl<A, B> StructuralPartialEq for TensorExpr<A, B>
Auto Trait Implementations§
impl<A, B> Freeze for TensorExpr<A, B>where
B: Freeze,
impl<A, B> RefUnwindSafe for TensorExpr<A, B>where
B: RefUnwindSafe,
A: RefUnwindSafe,
impl<A, B> Send for TensorExpr<A, B>
impl<A, B> Sync for TensorExpr<A, B>
impl<A, B> Unpin for TensorExpr<A, B>where
B: Unpin,
impl<A, B> UnwindSafe for TensorExpr<A, B>where
B: UnwindSafe,
A: 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
Mutably borrows from an owned value. Read more