LARS-research / AdaProp

[KDD 2023] AdaProp: Learning Adaptive Propagation for Graph Neural Network based Knowledge Graph Reasoning
https://arxiv.org/pdf/2205.15319.pdf
19 stars 3 forks source link

请教关于AdaProp代码问题 #3

Closed Nchu17205128 closed 11 months ago

Nchu17205128 commented 11 months ago

想请问一下代码运行的问题。在我的运行过程中,出现如下错误”ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (3564,) + inhomogeneous part.“。通过Debug发现,错误发生在dataloader中的query, answer = np.array(self.valid_q), np.array(self.valid_a),原因是因为self.valid_a中有的列表长度为3,有的列表长度为1,即报错中提到的inhomogeneous。请问这是我运行中提供的参数有问题还是什么原因导致的呢?我所提供的运行参数即您在Github中所提供的”python3 train.py --data_path ./data/family/ --train --topk 100 --layers 8 --fact_ratio 0.90 --gpu 0“命令。 烦请前辈指教一二!后生感激不尽!

AndrewZhou924 commented 11 months ago

Hi, it might be due to the version of numpy. Please check the solution and discussion in this issue.