Trait tc_tensor::TensorMath [−][src]
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 mul(self, other: O) -> TCResult<Self::LeftCombine>;
fn sub(self, other: O) -> TCResult<Self::Combine>;
}Expand description
Tensor math operations
Associated Types
type Combine: TensorInstance
type Combine: TensorInstance
The result type of a math operation
The result type of a math operation which may ignore right-hand-side values
Required methods
fn div(self, other: O) -> TCResult<Self::LeftCombine>
fn div(self, other: O) -> TCResult<Self::LeftCombine>
Divide self by other.
fn mul(self, other: O) -> TCResult<Self::LeftCombine>
fn mul(self, other: O) -> TCResult<Self::LeftCombine>
Multiply two tensors together.