Hi! I really like your work and try to utilize it on my own data.
But I met some question, after I turned my data into the similar format with Cora data in your original code , it showed some error:
DEVICE: cpu
GraphSage with Supervised Learning
----------------------EPOCH 0----------------------
Step [1/14], Loss: 2.0212, Dealed Nodes [77/274]
Step [2/14], Loss: 1.0991, Dealed Nodes [132/274]
Step [3/14], Loss: 0.6850, Dealed Nodes [175/274]
Step [4/14], Loss: 0.6396, Dealed Nodes [203/274]
Step [5/14], Loss: 0.5019, Dealed Nodes [217/274]
Step [6/14], Loss: 0.4753, Dealed Nodes [238/274]
Traceback (most recent call last):
File "", line 1, in
runfile('/Users/jishilun/Desktop/graphSAGE-portable/src/main2.py', wdir='/Users/jishilun/Desktop/graphSAGE-portable/src')
File "/anaconda3/lib/python3.7/site-packages/spyder_kernels/customize/spydercustomize.py", line 704, in runfile
execfile(filename, namespace)
File "/anaconda3/lib/python3.7/site-packages/spyder_kernels/customize/spydercustomize.py", line 108, in execfile
exec(compile(f.read(), filename, 'exec'), namespace)
File "/Users/jishilun/Desktop/graphSAGE-portable/src/main2.py", line 85, in
graphsage.classification = apply_model(data,ds,graphsage,classification,unsupervised_loss,args.b_sz,args.unsup_loss,device,args.learn_method)
File "/Users/jishilun/Desktop/graphSAGE-portable/src/utils.py", line 127, in apply_model
nodes_batch = np.asarray(list(unsupervised_loss.extend_nodes(nodes_batch, num_neg=num_neg)))
File "/Users/jishilun/Desktop/graphSAGE-portable/src/models.py", line 147, in extend_nodes
assert set(self.target_nodes) <= set(self.unique_nodes_batch)
AssertionError
Here, my data is not as big as Cora data, and there is less than 800 nodes in my network.
And when I split a smaller test_dataset and valid_data by change the code:
def _split_data(self, num_nodes, test_split = 3, val_split = 6):
--->
def _split_data(self, num_nodes, test_split = 8, val_split = 10):
it can be trained more time, but after some epochs, it showed the same error again