xnn.krnn.common.sgdml_iterative.kernel_product#

xnn.krnn.common.sgdml_iterative.kernel_product(model, x, u, v, energy_constraint=False)[source]#

K v for the kernel matrix of kernel_matrix(), without forming it.

Parameters:
  • model (SGDML) – Supplies the kernel and the permutations.

  • x (Tensor) – (M, D) training descriptors and (M, D, 3) their pair gradients.

  • u (Tensor) – (M, D) training descriptors and (M, D, 3) their pair gradients.

  • v (Tensor) – (3 N M,) coefficients ((3 N M + M,) with energy_constraint).

  • energy_constraint (bool, optional) – Whether the system has energy rows.

Returns:

The product, shaped like v.

Return type:

Tensor