(self, src:Tensor,
edge_index: torch.LongTensor,
edge_weight: torch.FloatTensor,
key_padding_mask:Optional[Tensor]=None,
attn_mask:Optional[Tensor]=None)
| 191 | self.res_attention = res_attention |
| 192 | |
| 193 | def forward(self, src:Tensor, |
| 194 | edge_index: torch.LongTensor, |
| 195 | edge_weight: torch.FloatTensor, |
| 196 | key_padding_mask:Optional[Tensor]=None, |
| 197 | attn_mask:Optional[Tensor]=None): |
| 198 | output = src |
| 199 | scores = None |
| 200 | if self.res_attention: |
| 201 | for mod in self.layers: output, scores = mod(output,edge_index, edge_weight, prev=scores, key_padding_mask=key_padding_mask, attn_mask=attn_mask) |
| 202 | return output |
| 203 | else: |
| 204 | for mod in self.layers: output = mod(output, key_padding_mask=key_padding_mask, attn_mask=attn_mask) |
| 205 | return output |
| 206 | |
| 207 | |
| 208 | ### Add DG-Conv and SG-Conv |
nothing calls this directly
no outgoing calls
no test coverage detected