pub trait TensorReduce<D: Dir> {
    type Txn: Transaction<D>;
    type Reduce: TensorInstance;

    fn max(self, axis: usize, keepdims: bool) -> TCResult<Self::Reduce>;
    fn max_all(&self, txn: Self::Txn) -> TCBoxTryFuture<'_, Number>;
    fn min(self, axis: usize, keepdims: bool) -> TCResult<Self::Reduce>;
    fn min_all(&self, txn: Self::Txn) -> TCBoxTryFuture<'_, Number>;
    fn product(self, axis: usize, keepdims: bool) -> TCResult<Self::Reduce>;
    fn product_all(&self, txn: Self::Txn) -> TCBoxTryFuture<'_, Number>;
    fn sum(self, axis: usize, keepdims: bool) -> TCResult<Self::Reduce>;
    fn sum_all(&self, txn: Self::Txn) -> TCBoxTryFuture<'_, Number>;
}
Expand description

Tensor reduction operations

Required Associated Types

The type of Transaction to expect

The result type of a reduce operation

Required Methods

Return the maximum of this Tensor along the given axis.

Return the maximum element in this Tensor.

Return the minimum of this Tensor along the given axis.

Return the minimum element in this Tensor.

Return the product of this Tensor along the given axis.

Return the product of all elements in this Tensor.

Return the sum of this Tensor along the given axis.

Return the sum of all elements in this Tensor.

Implementors