Skip to main content

contract

Function contract 

Source
pub fn contract(
    modes: &[usize],
    ranks: &[usize],
    cores: &[Vec<f64>],
) -> Vec<f64>
Expand description

Contract cores to the full tensor. Each step is one GEMM: P (M × r_{k−1}) · G_k (r_{k−1} × n_k r_k), and the row-major result is (M n_k) × r_k.