transport.samples.kernels.apply_raw
module torchmatch.transport.samples.kernels.apply_rawraw-form apply kernels (mat5 for HVP, deprecated vec/mat wrappers).
This module contains:
- mat5_sqeuclid: Active kernel for HVP computation (P_ij * (A_i . y_j) * y_j)
- apply_plan_vec_sqeuclid: Deprecated, delegates to shifted-form
- apply_plan_mat_sqeuclid: Deprecated, delegates to shifted-form
The mat5 kernel uses raw-form potentials (f, g include absorbed log marginals).
The deprecated wrappers convert raw potentials to shifted form and call shifted-form.
Members
function
- apply_plan_mat_sqeuclidApply P or Pt to a matrix without materializing P (streaming, stable).
- apply_plan_vec_sqeuclidApply P or Pt to a vector without materializing P (streaming, stable).
- mat5_sqeuclidCompute Mat5 term for HVP: Mat5 = (-4*cost_scale/eps) * sum_j P_ij (A_i.y_j) y_j.
Source: torchmatch/transport/samples/kernels/apply_raw.py:1