(self, graph, feat, eweight=None)
| 1603 | self.pool = None |
| 1604 | |
| 1605 | def forward(self, graph, feat, eweight=None): |
| 1606 | with graph.local_scope(): |
| 1607 | feat = self.linear(feat) |
| 1608 | graph.ndata["h"] = feat |
| 1609 | if eweight is None: |
| 1610 | graph.update_all(fn.copy_u("h", "m"), fn.sum("m", "h")) |
| 1611 | else: |
| 1612 | graph.edata["w"] = eweight |
| 1613 | graph.update_all( |
| 1614 | fn.u_mul_e("h", "w", "m"), fn.sum("m", "h") |
| 1615 | ) |
| 1616 | |
| 1617 | if self.pool: |
| 1618 | return self.pool(graph, graph.ndata["h"]) |
| 1619 | else: |
| 1620 | return graph.ndata["h"] |
| 1621 | |
| 1622 | # Explain node prediction |
| 1623 | model = Model(5, out_dim) |
nothing calls this directly
no test coverage detected