yinboc / DGP

Rethinking Knowledge Graph Propagation for Zero-Shot Learning, in CVPR 2019
MIT License
319 stars 57 forks source link

help #6

Closed PIGzyj233 closed 5 years ago

PIGzyj233 commented 5 years ago

I am a newbie..............when I train graph networks,I doubt about these error and I don not know how to resolve them: Traceback (most recent call last): File "train_gcn_basic.py", line 61, in gcn = GCN(n, edges, word_vectors.shape[1], fc_vectors.shape[1], hidden_layers).cuda() File "E:\实验\DGP-master\models\gcn.py", line 51, in init adj = spm_to_tensor(adj) File "E:\实验\DGP-master\utils.py", line 68, in spm_to_tensor (sparse_mx.row, sparse_mx.col))).long() TypeError: can't convert np.ndarray of type numpy.int32. The only supported types are: double, float, float16, int64, int32, and uint8.

yinboc commented 5 years ago

Hi,

I also have no idea where this problem comes from. Could you check if your numpy / scipy versions are up to date? Seems it failed when converting types, or you may test which step it failed.