GCNConv
- class dhg.nn.GCNConv(*args, **kwargs)[source]
Bases:
torch.nn.ModuleThe GCN convolution layer proposed in Semi-Supervised Classification with Graph Convolutional Networks paper (ICLR 2017).
Matrix Format:
\[\mathbf{X}^{\prime} = \sigma \left( \mathbf{\hat{D}}^{-\frac{1}{2}} \mathbf{\hat{A}} \mathbf{\hat{D}}^{-\frac{1}{2}} \mathbf{X} \mathbf{\Theta} \right),\]where \(\mathbf{\hat{A}} = \mathbf{A} + \mathbf{I}\) and \(\mathbf{\hat{D}}_{ii} = \sum_j \mathbf{\hat{A}}_{ij}\).
- Parameters
in_channels (
int) – \(C_{in}\) is the number of input channels.out_channels (
int) – \(C_{out}\) is the number of output channels.bias (
bool) – If set toFalse, the layer will not learn the bias parameter. Defaults toTrue.use_bn (
bool) – If set toTrue, the layer will use batch normalization. Defaults toFalse.drop_rate (
float) – The dropout probability. Ifdropout <= 0, the layer will not drop values. Defaults to0.5.is_last (
bool) – If set toTrue, the layer will not apply the final activation and dropout functions. Defaults toFalse.