We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
在utils.py中normalize(mx)中对邻接矩阵的正则化计算:
def normalize(mx): """Row-normalize sparse matrix""" rowsum = np.array(mx.sum(1)) r_inv = np.power(rowsum, -1).flatten() r_inv[np.isinf(r_inv)] = 0. r_mat_inv = sp.diags(r_inv) mx = r_mat_inv.dot(mx) return mx
它的意思是将度矩阵求导D-1 *A,而您的论文中是D-1/2 * A * D-1/2 (请忽略符号上没加小帽子),即下面这个函数,它是GCN原文的对adj正则的代码
def normalize_adj(adj, self_loop=True): """Symmetrically normalize adjacency matrix.""" if self_loop: adj = adj + sp.eye(adj.shape[0]) adj = sp.coo_matrix(adj) rowsum = np.array(adj.sum(1)) d_inv_sqrt = np.power(rowsum, -0.5).flatten() d_inv_sqrt[np.isinf(d_inv_sqrt)] = 0. d_mat_inv_sqrt = sp.diags(d_inv_sqrt) return adj.dot(d_mat_inv_sqrt).transpose().dot(d_mat_inv_sqrt).tocoo()
虽然我看到DAEGC的代码也是上面的公式?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
在utils.py中normalize(mx)中对邻接矩阵的正则化计算:
它的意思是将度矩阵求导D-1 *A,而您的论文中是D-1/2 * A * D-1/2 (请忽略符号上没加小帽子),即下面这个函数,它是GCN原文的对adj正则的代码
虽然我看到DAEGC的代码也是上面的公式?
The text was updated successfully, but these errors were encountered: