edge_index, edge_weight = add_remaining_self_loops(edge_index, edge_weight, 1, x.size(0)) # 2 x (E+N), [E+N] 2.1 Add node's self infomation (value=0) to edge_attr self_loop_edges = torch.zeros(x.size(0), edge_attr.size(1)).to(edge_index.device) # N x edge_dim edg...
edge_weight = torch.ones((edge_index.size(1),), dtype=x.dtype, device=edge_index.device) # [E+N] row, col = edge_index # [E+N], [E+N] deg = scatter_add(edge_weight, row, dim=0, dim_size=x.size(0)) # [N] deg_inv_sqrt = deg.pow(-0.5) # [N] deg_inv_sqrt[deg...