GMMConv
- class dgNN.layers.GMMConv(self, in_feats, out_feats, dim, n_kernels, aggregator_type='sum', residual=False, bias=True)
Gaussian Mixture Model Convolution layer from Geometric Deep Learning on Graphs and Manifolds using Mixture Model CNNs
\[\begin{split}\begin{aligned} u_{i j} &=f\left(x_{i}, x_{j}\right), x_{j} \in \mathcal{N}(i) \\ w_{k}(u) &=\exp \left(-\frac{1}{2}\left(u-\mu_{k}\right)^{T} \Sigma_{k}^{-1}\left(u-\mu_{k}\right)\right) \\ h_{i}^{l+1} &=\text { aggregate }\left(\left\{\frac{1}{K} \sum_{k}^{K} w_{k}\left(u_{i j}\right), \forall j \in \mathcal{N}(i)\right\}\right) \end{aligned}\end{split}\]- Parameters
in_feats (int) – input feature size.
out_feats (int) – output feature size.
dim (int) – dimensionality of pseudo-coordinte.
n_kernels (int) – number of kernels.
residual (bool) – whether to use residual connection.
bias (bool) – whether to learn a bias term.
- forward(self, rowptr, colind, colptr, rowind, permute, feat, pseudo)
- Parameters
rowptr (torch.tensor) – CSR format index pointer tensor of shape \((V+1)\), where \(V\) is the number of vertices.
colind (torch.tensor) – CSR format index tensor of shape \((E)\), where \(E\) is the number of edges.
colptr (torch.tensor) – CSC format index pointer tensor of shape \((N+1)\).
rowind (torch.tensor) – CSC format index tensor of shape \((E)\).
permute (torch.tensor) – csr.data[k]=csc.data[permute[k]],index tensor of shape \((E)\).
feat (torch.tensor) – the input feature of shape \((N,F_{in})\), where \(F_{in}\) is the input feature size.
pseudo (torch.tensor) – pseudo coordinate tensor of shape \((E, D_u)\) where \(D_u\) is the dimensionality of pseudo coordinate.
- Returns
the output feature of shape \((N, F_{out})\), where \(F_{out}\) is the output feature size.
- Return type
torch.tensor