Trait tc_tensor::TensorUnary
source · [−]pub trait TensorUnary<D: Dir> {
type Txn: Transaction<D>;
type Unary: TensorInstance;
fn abs(&self) -> TCResult<Self::Unary>;
fn exp(&self) -> TCResult<Self::Unary>;
fn ln(&self) -> TCResult<Self::Unary>;
fn round(&self) -> TCResult<Self::Unary>;
fn all<'async_trait>(
self,
txn: Self::Txn
) -> Pin<Box<dyn Future<Output = TCResult<bool>> + Send + 'async_trait>>
where
Self: 'async_trait;
fn any<'async_trait>(
self,
txn: Self::Txn
) -> Pin<Box<dyn Future<Output = TCResult<bool>> + Send + 'async_trait>>
where
Self: 'async_trait;
fn not(&self) -> TCResult<Self::Unary>;
}
Expand description
Unary Tensor
operations
Required Associated Types
type Txn: Transaction<D>
type Txn: Transaction<D>
The type of Transaction
to expect
type Unary: TensorInstance
type Unary: TensorInstance
The return type of a unary operation
Required Methods
Return true
if all elements in this Tensor
are nonzero.
Return true
if any element in this Tensor
is nonzero.