Return: A list of predictions. i-th element represents prediction at i-th position of the sequence.
(self, batched_data)
| 75 | |
| 76 | |
| 77 | def forward(self, batched_data): |
| 78 | ''' |
| 79 | Return: |
| 80 | A list of predictions. |
| 81 | i-th element represents prediction at i-th position of the sequence. |
| 82 | ''' |
| 83 | |
| 84 | h_node = self.gnn_node(batched_data) |
| 85 | |
| 86 | h_graph = self.pool(h_node, batched_data.batch) |
| 87 | |
| 88 | if self.num_class > 0: |
| 89 | return self.graph_pred_linear(h_graph) |
| 90 | |
| 91 | pred_list = [] |
| 92 | for i in range(self.max_seq_len): |
| 93 | pred_list.append(self.graph_pred_linear_list[i](h_graph)) |
| 94 | |
| 95 | return pred_list |
| 96 | |
| 97 | if __name__ == '__main__': |
| 98 | pass |
nothing calls this directly
no outgoing calls
no test coverage detected