muhanzhang / SEAL

SEAL (learning from Subgraphs, Embeddings, and Attributes for Link prediction). "M. Zhang, Y. Chen, Link Prediction Based on Graph Neural Networks, NeurIPS 2018 spotlight".
607 stars 142 forks source link

TypeError: unsupported operand type(s) for +: 'NoneType' and 'NoneType' #84

Open POLARXSSS opened 1 year ago

POLARXSSS commented 1 year ago

Hi muhan, 我最近使用模型时遇到这个问题不知道怎么解决: Traceback (most recent call last): File "C:\Users\Miao Jiangbei\Desktop\计算机\机器学习\Lab\SEAL\Python\Main.py", line 162, in train_graphs, test_graphs, max_n_label = links2subgraphs( File "C:\Users\Miao Jiangbei\Desktop\计算机\机器学习\Lab\SEAL\Python\util_functions.py", line 135, in links2subgraphs train_graphs = helper(A, train_pos, 1) + helper(A, train_neg, 0) TypeError: unsupported operand type(s) for +: 'NoneType' and 'NoneType' 我不知道为什么会得到'NoneType'

muhanzhang commented 1 year ago

Can you try to set a breakpoint before g_list in helper() function to see what it prints? Seems the helper does not return any subgraphs, not even an empty list.