Skip to main content

dot_along_dim

Function dot_along_dim 

Source
pub fn dot_along_dim<T, U>(
    src: &Tensor<T, CpuBackend>,
    scalars: &Tensor<U, CpuBackend>,
    dim: usize,
) -> Tensor<U, CpuBackend>
where T: AbstractField + 'static + Sync, U: AbstractExtensionField<T> + 'static + Send + Sync,
Expand description

Compute the dot product of a tensor with a scalar tensor along a given dimension.

This scalar tensor is assumed to be a 1D tensor, which is any tensor of a shape [len, 1, 1, 1,..].