pub trait MatrixOps {
// Required methods
fn matmul(&self, other: &Tensor) -> Result<Tensor>;
fn transpose(&self) -> Result<Tensor>;
fn transpose_dims(&self, dim1: usize, dim2: usize) -> Result<Tensor>;
fn batch_matmul(&self, other: &Tensor) -> Result<Tensor>;
}Expand description
Trait for matrix operations on tensors.
Required Methods§
Sourcefn transpose_dims(&self, dim1: usize, dim2: usize) -> Result<Tensor>
fn transpose_dims(&self, dim1: usize, dim2: usize) -> Result<Tensor>
Transpose with specific dimension indices.
Sourcefn batch_matmul(&self, other: &Tensor) -> Result<Tensor>
fn batch_matmul(&self, other: &Tensor) -> Result<Tensor>
Batch matrix multiplication.