spd_learn.functional.normalize_spd_adjacency#
- spd_learn.functional.normalize_spd_adjacency(adjacency: Tensor) Tensor[source]#
Normalize nonnegative adjacency weights with unit self-loops.
- Parameters:
adjacency (torch.Tensor) – Finite nonnegative adjacency matrices of shape (…, nodes, nodes).
- Returns:
Row-stochastic propagation matrices with the input shape, dtype and device.
- Return type:
Notes
Existing diagonal weights are retained before adding the self-loops.