Skip to main content

TensorTensordotExt

Trait TensorTensordotExt 

Source
pub trait TensorTensordotExt {
    // Required method
    fn tensordot<B: TensorBackend>(
        &self,
        rhs: &Tensor,
        axes: TensorDotAxes<'_>,
        backend: &mut B,
    ) -> Result<Tensor>;
}
Expand description

Backend-explicit tensordot sugar for dtype-erased concrete tensors.

Required Methods§

Source

fn tensordot<B: TensorBackend>( &self, rhs: &Tensor, axes: TensorDotAxes<'_>, backend: &mut B, ) -> Result<Tensor>

Contract this tensor with rhs over explicit axes or an axis count.

§Errors

Returns Error::Validation with InvalidArgument, RankMismatch, AxisOutOfBounds, or ShapeMismatch for invalid axes or incompatible contracting dimensions, or Error::Tensor when backend execution fails.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl TensorTensordotExt for Tensor

Source§

fn tensordot<B: TensorBackend>( &self, rhs: &Tensor, axes: TensorDotAxes<'_>, backend: &mut B, ) -> Result<Tensor>

Implementors§