(self, x, edge_index, edge_weight=None, batch=None)
| 80 | self.norms.append(obtain_norm(self.norm)(self.emb_dim[i + 1])) |
| 81 | |
| 82 | def forward(self, x, edge_index, edge_weight=None, batch=None): |
| 83 | |
| 84 | xs = [] |
| 85 | for i in range(self.num_layer): |
| 86 | x = self.encs[i](x, edge_index, edge_weight) |
| 87 | x = self.norms[i](x) if self.norm else x |
| 88 | x = F.dropout(self.acts[i](x), self.drop_ratio, training=self.training) |
| 89 | xs.append(x) |
| 90 | |
| 91 | if batch is not None: |
| 92 | xs = [global_add_pool(x, batch) for x in xs] |
| 93 | |
| 94 | if self.concat: |
| 95 | x = torch.concat(xs, dim=1) |
| 96 | else: |
| 97 | x = xs[-1] |
| 98 | |
| 99 | return x |
| 100 | |
| 101 | |
| 102 | class GraphCL(nn.Module): |
nothing calls this directly
no outgoing calls
no test coverage detected