#[non_exhaustive]pub enum TensorExpr<A, B = A> {
Binary(Box<TensorBase<A>>, Box<TensorBase<B>>, BinaryOp),
BinaryScalar(Box<TensorBase<A>>, B, BinaryOp),
Unary(Box<TensorBase<A>>, UnaryOp),
Matmul(Box<TensorBase<A>>, Box<TensorBase<B>>),
Sigmoid(Box<TensorBase<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(Box<TensorBase<A>>, Box<TensorBase<B>>, BinaryOp)
BinaryScalar(Box<TensorBase<A>>, B, BinaryOp)
Unary(Box<TensorBase<A>>, UnaryOp)
Matmul(Box<TensorBase<A>>, Box<TensorBase<B>>)
Sigmoid(Box<TensorBase<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, ) -> TensorExpr<A, B>
pub fn binary_scalar( lhs: TensorBase<A>, rhs: B, op: BinaryOp, ) -> TensorExpr<A, B>
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) -> TensorExpr<A, B>
pub fn matmul(lhs: TensorBase<A>, rhs: TensorBase<B>) -> TensorExpr<A, B>
pub fn reshape(tensor: TensorBase<A>, shape: Shape) -> TensorExpr<A, B>
pub fn shape(expr: ReshapeExpr<A>) -> TensorExpr<A, B>
pub fn sigmoid(tensor: TensorBase<A>) -> TensorExpr<A, B>
pub fn swap_axes( tensor: TensorBase<A>, swap: Axis, with: Axis, ) -> TensorExpr<A, B>
pub fn transpose(tensor: TensorBase<A>) -> TensorExpr<A, B>
pub fn unary(tensor: TensorBase<A>, op: UnaryOp) -> TensorExpr<A, B>
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, B> Clone for TensorExpr<A, B>
impl<A, B> Clone for TensorExpr<A, B>
Source§fn clone(&self) -> TensorExpr<A, B>
fn clone(&self) -> TensorExpr<A, B>
Returns a copy 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<A, B> Debug for TensorExpr<A, B>
impl<A, B> Debug for TensorExpr<A, B>
Source§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<TensorExpr<A, B>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<TensorExpr<A, B>, <__D as Deserializer<'de>>::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>) -> TensorExpr<A, B>
fn from(expr: ReshapeExpr<A>) -> TensorExpr<A, B>
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>) -> BackpropOp<T>
fn from(op: TensorExpr<T>) -> BackpropOp<T>
Converts to this type from the input type.
Source§impl<A, B> Hash for TensorExpr<A, B>
impl<A, B> Hash for TensorExpr<A, B>
Source§impl<A, B> PartialEq for TensorExpr<A, B>
impl<A, B> PartialEq for TensorExpr<A, B>
Source§impl<A, B> Serialize for TensorExpr<A, B>
impl<A, B> Serialize for TensorExpr<A, B>
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,
Serialize this value into the given Serde serializer. Read more
impl<A, B> 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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
Compare self to
key
and return true
if they are equal.