From ec9c2cb0d8e767612d3ae747dcdc95dec9632cad Mon Sep 17 00:00:00 2001 From: jzw <1246975568@qq.com> Date: Wed, 11 Jan 2023 10:44:16 +0800 Subject: [PATCH] Update run_gcn_cora.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修改位置没有加toarray()会导致tensor转换报错,添加即可 --- gnn/run_gcn_cora.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnn/run_gcn_cora.py b/gnn/run_gcn_cora.py index 1e7fd19..22a11b8 100644 --- a/gnn/run_gcn_cora.py +++ b/gnn/run_gcn_cora.py @@ -27,7 +27,7 @@ else: X = features feature_dim = X.shape[-1] - model_input = [X, A] + model_input = [X, A.toarray()] # Compile model model = GCN(A.shape[-1], feature_dim, 16, y_train.shape[1], dropout_rate=0.5, l2_reg=2.5e-4,