VerticalCompression#

hypercoil.nn.vertcom.VerticalCompression(in_features: int, out_features: int, lattice_order: int, out_channels: int = 1, renormalise: bool = True, fold_channels: bool = True, forward_operation: Literal['compress', 'uncompress', 'reconstruct'] = 'compress', sign: int = 1, *, key: jax.random.PRNGKey)[source]#

Compress a graph by fusing vertices. For an adjacency matrix A, this layer applies the transform \(\left(C_{row} A\right) \times C_{col}^{\intercal}\) so that an \(H_{in} \times W_{in}\) matrix is mapped to an \(H_{out} \times W_{out}\) matrix.