Compare my work to original repo#1
Conversation
for the learnable parameter count to be just under zinc-sparse for fair comparison
- add include_down_adj argument to ZincDataset - add include_down_adj to exp.parser - similar changes in data_loading and run_exp plus - aesthetic change to CochainMessagePassing's docstring
Edit existing tests to account for its new interface - The interface for calling CochainMessagePassing.propagate has changed: one extra argument and one extra output - I still need to write tests for co-boundary support for CochainMessagePassing
To control how many computers we are parellizing over
| if dim > 0 and self.cochains[dim - 1].x is not None: | ||
| boundary_features = self.cochains[dim - 1].x | ||
|
|
||
| # Add coboundary features |
There was a problem hiding this comment.
Add coboundary features to the CochainMessagePassingParams that Cochain.get_cochain_params returns.
Explanation: A Cochain represents a subset of the graph (i.e. Complex, which is the main data object in this repository). CochainMessagePassingParams is a collection of current feature vectors prepared by Cochain each timestep, so it can be passed into the timestep's neural network layer.
| boundary_index[0].append(boundary) | ||
| boundary_index = torch.LongTensor(boundary_index) | ||
|
|
||
|
|
There was a problem hiding this comment.
Add coboundary processing capability to graph data pre-processing code.
Further explanation: A normal graph dataset (with node and edge information) can be passed into convert_graph_dataset_with_gudhi to be turned into a cw-complex dataset (with node, edge, ring, boundary and coboundary information). I added a simple extension to support coboundary information. See also extension to convert_graph_dataset_with_rings.
| return scatter(inputs, agg_boundary_index, dim=self.node_dim, dim_size=boundary_dim_size, | ||
| reduce=self.aggr_boundary) | ||
|
|
||
| def aggregate_coboundary(self, inputs: Tensor, agg_coboundary_index: Tensor, |
There was a problem hiding this comment.
Add aggregate_coboundary method to CochainMessagePassing class.
Analagous to pytorch-geometric's MessagePassing.aggregate.
Also see #1 (comment)
| """ | ||
| return boundary_x_j | ||
|
|
||
| def message_coboundary(self, coboundary_x_j: Tensor): |
There was a problem hiding this comment.
Add message_coboundary method to CochainMessagePassing class.
Analagous to pytorch-geometric's MessagePassing.message.
Also see #1 (comment)
| return self.__class__.__name__ | ||
|
|
||
|
|
||
| class EmbedDenseCIN(torch.nn.Module): |
There was a problem hiding this comment.
Modified the EmbedSparseCIN graph neural network to support coboundary information, resulting in EmbedDenseCIN.
No description provided.