diff --git a/input.py b/input.py index f471b3d..c8267be 100644 --- a/input.py +++ b/input.py @@ -59,8 +59,7 @@ def mask_test_edges(adj): # edges_all相当于排列,就都包含了 edges = adj_tuple[0] edges_all = sparse_to_tuple(adj)[0] - # 取edge的10%作为test - # 取edge的20%作为val + num_test = int(np.floor(edges.shape[0] / 10.)) num_val = int(np.floor(edges.shape[0] / 20.)) diff --git a/train.py b/train.py index 6392162..2f2fa23 100644 --- a/train.py +++ b/train.py @@ -46,7 +46,7 @@ if __name__ == "__main__": feature_sample = pca.fit_transform(feature_sample) kde = KernelDensity(bandwidth=0.7).fit(np.array([feature_sample[i] for i in index])) - # 计算图中预输入数据 + # 预输入的数据 placeholders = { 'features': tf.sparse_placeholder(tf.float32), 'features_dense': tf.placeholder(tf.float32, shape=[feas['adj'].shape[0], feas['num_features']], name='real_distribution'),