Apply Graph Conv Layer Args: node_feature_mat (Layer): Node feature matrix with the shape of (num_nodes,input_channels) source_indices (Layer): Source node indices of the edges with shape (num_nodes) target_indices (Layer): Target node indices of the edge
(self, node_feature_mat, source_indices, target_indices)
| 91 | name=self.name+"_Message_FC_layer") |
| 92 | |
| 93 | def forward(self, node_feature_mat, source_indices, target_indices): |
| 94 | """Apply Graph Conv Layer |
| 95 | |
| 96 | Args: |
| 97 | node_feature_mat (Layer): Node feature matrix with the shape of (num_nodes,input_channels) |
| 98 | source_indices (Layer): Source node indices of the edges with shape (num_nodes) |
| 99 | target_indices (Layer): Target node indices of the edges with shape (num_nodes) |
| 100 | Returns: |
| 101 | (Layer) : The output after kernel ops. The output can passed into another Graph Conv layer |
| 102 | directly |
| 103 | """ |
| 104 | |
| 105 | |
| 106 | new_self_features = self.id_nn(node_feature_mat) |
| 107 | |
| 108 | new_neighbor_features = self.mat_nn(node_feature_mat) |
| 109 | # Place the new features on to neighborhoods |
| 110 | neighborhoods = GraphExpand(new_neighbor_features, target_indices) |
| 111 | # Accumulate Messages from Neighboring Nodes |
| 112 | reduced_features = GraphReduce(neighborhoods, source_indices, [self.num_nodes, self.output_channel_size]) |
| 113 | |
| 114 | out_features = lbann.Sum(new_self_features, reduced_features) |
| 115 | return out_features |
nothing calls this directly
no test coverage detected