cascade.nn.SpecNorm.mv

static SpecNorm.mv(idx, val, vec)[source]

Sparse matrix-vector product with particles in the last dimension

Parameters:
  • idx (Tensor) – Index of the sparse matrix (2, n_edges)

  • val (Tensor) – Values of the sparse matrix (n_edges, n_particles)

  • vec (Tensor) – Vector of shape (n_vars, n_particles)

Return type:

Tensor

Returns:

Matrix-vector product of shape (n_vars, n_particles)