Module ops

Source
Expand description

This module provides the core operations for tensors, including filling, padding, reshaping, and tensor manipulation.

Modules§

fill
pad
reshape
tensor

Structs§

PadActionIter
An iterator over the variants of PadAction
Padding

Enums§

PadAction
PadError
PadMode

Traits§

Affine
apply an affine transformation to a tensor; affine transformation is defined as mul * self + add
DecrementAxis
The DecrementAxis trait defines a method enabling an axis to decrement itself,
IncrementAxis
The IncrementAxis trait defines a method enabling an axis to increment itself, effectively adding a new axis to the array.
Inverse
The Inverse trait generically establishes an interface for computing the inverse of a type, regardless of if its a tensor, scalar, or some other compatible type.
IsSquare
IsSquare is a trait for checking if the layout, or dimensionality, of a tensor is square.
MaskFill
This trait is used to fill an array with a value based on a mask. The mask is a boolean array of the same shape as the array.
MatMul
The MatMul trait defines an interface for matrix multiplication.
MatPow
The MatPow trait defines an interface for computing the exponentiation of a matrix.
Pad
The Pad trait defines a padding operation for tensors.
Transpose
The Transpose trait generically establishes an interface for transposing a type
Unsqueeze
The Unsqueeze trait establishes an interface for a routine that unsqueezes an array, by inserting a new axis at a specified position. This is useful for reshaping arrays to meet specific dimensional requirements.

Functions§

pad
pad_to

Type Aliases§

PadResult