pub trait TensorMath<D: Dir, O> {
    type Combine: TensorInstance;
    type LeftCombine: TensorInstance;

    fn add(self, other: O) -> TCResult<Self::Combine>;
    fn div(self, other: O) -> TCResult<Self::LeftCombine>;
    fn log(self, base: O) -> TCResult<Self::LeftCombine>;
    fn mul(self, other: O) -> TCResult<Self::LeftCombine>;
    fn pow(self, other: O) -> TCResult<Self::LeftCombine>;
    fn sub(self, other: O) -> TCResult<Self::Combine>;
}
Expand description

Tensor math operations

Required Associated Types

The result type of a math operation

The result type of a math operation which may ignore right-hand-side values

Required Methods

Add two tensors together.

Divide self by other.

Element-wise logarithm of self with respect to the given base.

Multiply two tensors together.

Raise self to the power of other.

Subtract other from self.

Implementors