torch_geometric.transforms.GCNNorm

class GCNNorm(add_self_loops: bool = True)[source]

Bases: BaseTransform

应用来自“基于图卷积网络的半监督分类”论文的GCN归一化(函数名称:gcn_norm)。

\[\mathbf{\hat{A}} = \mathbf{\hat{D}}^{-1/2} (\mathbf{A} + \mathbf{I}) \mathbf{\hat{D}}^{-1/2}\]

其中 \(\hat{D}_{ii} = \sum_{j=0} \hat{A}_{ij} + 1\).