https://github.com/yanzhanglab/Graph2GO
运行主程序
Using TensorFlow backend.
Namespace(data_path='../../data/', dropout=0, epochs_ppi=80, epochs_simi=60, graphs=['combined', 'similarity'], hidden1=800, hidden2=400, lr=0.001, model='gcn_vae', only_gcn=0, ppi_attributes=6, save_results=1, simi_attributes=5, species='human', supervised='nn', thr_combined=0.3, thr_evalue=0.0001, weight_decay=0)
loading features...
#############################
Training combined
loading data...
generating features...
loading graph...
Traceback (most recent call last):
File "D:/Users/.../PycharmProjects/Graph2GO-master210805/src/Graph2GO/main.py", line 143, in <module>
train(args)
File "D:/Users/.../PycharmProjects/Graph2GO-master210805/src/Graph2GO/main.py", line 30, in train
embeddings = train_gcn(features, adj, args, graph)
File "D:Users...PycharmProjectsGraph2GO-master210805srcGraph2GOtrainGcn.py", line 23, in train_gcn
adj_orig = adj_orig - sp.dia_matrix((adj_orig.diagonal()[np.newaxis, :], [0]), shape=adj_orig.shape)
File "D:Users...PycharmProjectsGraph2GO-master210805venvlibsite-packagesscipysparsecompressed.py", line 533, in diagonal
raise ValueError("k exceeds matrix dimensions")
ValueError: k exceeds matrix dimensions
然而,我没有发现超出范围的调试
这是作者在复制稀疏矩阵时犯的一个愚蠢的错误,简单的解决方法是在第22行的trainGcn.py中确保您正在复制矩阵,用替换第22行
adj_orig = adj_train.copy()
我已经在这里向GitHub回购提交了一份PR