tkipf / gcn

Implementation of Graph Convolutional Networks in TensorFlow
MIT License
7.16k stars 2k forks source link

Something error in NELL dataset #144

Open LeungH opened 5 years ago

LeungH commented 5 years ago

Hi, tkipf, i run GCN on NELL dataset. I have watched the closed issue #14 and edit the code, but i still have the same problem. this is the errore output: Traceback (most recent call last): File "/home/hikari/gcn/gcn/train.py", line 29, in adj, features, y_train, y_val, y_test, train_mask, val_mask, test_mask = load_data(FLAGS.dataset) File "/home/hikari/.conda/envs/GCN/lib/python3.5/site-packages/gcn-1.0-py3.5.egg/gcn/utils.py", line 69, in load_data tx_extended = sp.lil_matrix((len(test_idx_range_full), x.shape[1])) File "/home/hikari/.conda/envs/GCN/lib/python3.5/site-packages/scipy-1.3.0-py3.5-linux-x86_64.egg/scipy/sparse/lil.py", line 236, in getitem return IndexMixin.getitem(self, key) File "/home/hikari/.conda/envs/GCN/lib/python3.5/site-packages/scipy-1.3.0-py3.5-linux-x86_64.egg/scipy/sparse/_index.py", line 44, in getitem return self._get_arrayXslice(row, col) File "/home/hikari/.conda/envs/GCN/lib/python3.5/site-packages/scipy-1.3.0-py3.5-linux-x86_64.egg/scipy/sparse/lil.py", line 258, in _get_arrayXslice return self._get_row_ranges(row, col) File "/home/hikari/.conda/envs/GCN/lib/python3.5/site-packages/scipy-1.3.0-py3.5-linux-x86_64.egg/scipy/sparse/lil.py", line 308, in _get_row_ranges j_start, j_stop, j_stride, nj) File "_csparsetools.pyx", line 789, in scipy.sparse._csparsetools.lil_get_row_ranges ValueError: row index 9897 out of bounds

Process finished with exit code 1

Can you tell me how to fix this?

shengwenliang commented 5 years ago

Hi, maybe your code has some problems or nell dataset has some problems. you can refer my code: dgl. The related code path is dgl/python/dgl/data/citation_graph.py. The nell dataset can be download from nell. Then zip the nell 0.001 dataset to nell.0.001.zip. Then move nell.0.001.zip to .dgl folder. Then you can run dgl/example/pytorch/gcn.py by using command: python3 train.py --dataset nell.0.001 --gpu 0

My test accuracy is 0.6429.

Zian-Zhou commented 4 years ago

@shengwenLeong Hi, I wanna figure out the difference among the datasets nell.0.1, nell.0.01 and nell.0.001. Could you answer my quetion? Maybe it is related to the paper 'Revisiting Semi-Supervised Learning with Graph Embeddings '(Table 5). I check the dataset with running my code, but I can't find any difference. The number of the labeled data from these 3 dataset are closed, respectively 8543, 8404, and 8422.

fansariadeh commented 4 years ago

Hi, maybe your code has some problems or nell dataset has some problems. you can refer my code: dgl. The related code path is dgl/python/dgl/data/citation_graph.py. The nell dataset can be download from nell. Then zip the nell 0.001 dataset to nell.0.001.zip. Then move nell.0.001.zip to .dgl folder. Then you can run dgl/example/pytorch/gcn.py by using command: python3 train.py --dataset nell.0.001 --gpu 0

My test accuracy is 0.6429.

I did all stepos but it simply gives me this error: Using backend: pytorch Traceback (most recent call last): File "train.py", line 9, in from gcn import GCN File "C:\Users\Fatima\OneDrive - Swinburne University\MachineLearning\MyResearch\GIT\dgl-master\examples\pytorch\gcn\gcn.py", line 10, in from dgl.nn.pytorch import GraphConv, GraphConv_GRU ImportError: cannot import name 'GraphConv_GRU' from 'dgl.nn.pytorch' (C:\Users\Fatima\AppData\Local\Programs\Python\Python38\lib\site-packages\dgl\nn\pytorch__init__.py)

Can you please give me a hint?