keras-gcn icon indicating copy to clipboard operation
keras-gcn copied to clipboard

Face TypeError during load data

Open Wilson-ZHANG opened this issue 5 years ago • 2 comments

As the format of Cora Dataset(cora.cites & cora.content), I generate similar data as Cora. However, It gets error below after a few times modification on my data. Traceback (most recent call last): File "train.py", line 26, in X, A, y = load_data(cites_path, content_path) File "/data/zhangqifan/projects/keras-gcn-master/kegra/utils.py", line 26, in load_data edges = np.array(list(map(idx_map.get, edges_unordered.flatten())), dtype=np.int64).reshape(edges_unordered.shape) TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'

Could you give me some ideas about addressing this problem? Thanks!

Wilson-ZHANG avatar Jul 28 '19 12:07 Wilson-ZHANG

I have also encountered this problem. For me, it is because some nodes in the edgelists(.cites) did not have features and labels, and when i make all nodes have features and labels, there is no problem. I wonder that could't semi-supervise learning if there is no feature and label on some nodes?

WangFeng666 avatar Nov 21 '19 09:11 WangFeng666

I have also encountered this problem. For me, it is because some nodes in the edgelists(.cites) did not have features and labels, and when i make all nodes have features and labels, there is no problem. I wonder that could't semi-supervise learning if there is no feature and label on some nodes?

yes. I believe if you initialize a trainable feature for each of those nodes that doesn't have a feature, backpropagation can train it easily.

DonghanHe avatar Nov 24 '19 19:11 DonghanHe