Siamese_ChannelIndependentConv¶
- class src.gconv.Siamese_ChannelIndependentConv(in_features, num_features, in_edges, out_edges=None)[source]¶
Siamese Channel Independent Conv neural network for processing arbitrary number of graphs.
- Parameters
in_features – the dimension of input node features
num_features – the dimension of output node features
in_edges – the dimension of input edge features
out_edges – (optional) the dimension of output edge features. It needs to be the same as
num_features
- forward(g1: Tuple[torch.Tensor, torch.Tensor, Optional[bool]], *args) List[torch.Tensor] [source]¶
Forward computation of Siamese Channel Independent Conv.
- Parameters
g1 – The first graph, which is a tuple of (\((b\times n\times n)\) {0,1} adjacency matrix, \((b\times n\times d_n)\) input node embedding, \((b\times n\times n\times d_e)\) input edge embedding, mode (
1
or2
))args – Other graphs
- Returns
A list of tensors composed of new node embeddings \((b\times n\times d^\prime)\), appended with new edge embeddings \((b\times n\times n\times d^\prime)\)
- training: bool¶