malllabiisc / EmbedKGQA

ACL 2020: Improving Multi-hop Question Answering over Knowledge Graphs using Knowledge Base Embeddings
Apache License 2.0
415 stars 95 forks source link

question about webqsp_full train.How can I train the model(full)? #96

Closed Dionysusssss closed 3 years ago

Dionysusssss commented 3 years ago

here's the error. half pre_embedding is 400, rather full pre_embedding is 256, when I use provided checkpoint.

Traceback (most recent call last): File "main_origin_backup.py", line 541, in do_batch_norm=args.do_batch_norm) File "main_origin_backup.py", line 351, in train loss = model(question_tokenized=question_tokenized, attention_mask=attention_mask, p_head=positive_head, p_tail=positive_tail) File "/data4/yhchen/miniconda3/envs/py3.6/lib/python3.6/site-packages/torch/nn/modules/module.py", line 532, in call result = self.forward(*input, *kwargs) File "/data4/yhchen/EmbedKGQA/KGQA/RoBERTa/model.py", line 342, in forward pred = self.getScores(p_head, rel_embedding) File "/data4/yhchen/EmbedKGQA/KGQA/RoBERTa/model.py", line 203, in ComplEx re_score = re_head re_relation - im_head * im_relation RuntimeError: The size of tensor a (128) must match the size of tensor b (200) at non-singleton dimension 1

Yclock commented 2 months ago

here's the error.

half pre_embedding is 400, rather full pre_embedding is 256, when I use provided checkpoint. Traceback (most recent call last): File "main_origin_backup.py", line 541, in do_batch_norm=args.do_batch_norm) File "main_origin_backup.py", line 351, in train loss = model(question_tokenized=question_tokenized, attention_mask=attention_mask, p_head=positive_head, p_tail=positive_tail) File "/data4/yhchen/miniconda3/envs/py3.6/lib/python3.6/site-packages/torch/nn/modules/module.py", line 532, in call result = self.forward(*input, *kwargs) File "/data4/yhchen/EmbedKGQA/KGQA/RoBERTa/model.py", line 342, in forward pred = self.getScores(p_head, rel_embedding) File "/data4/yhchen/EmbedKGQA/KGQA/RoBERTa/model.py", line 203, in ComplEx re_score = re_head re_relation - im_head * im_relation RuntimeError: The size of tensor a (128) must match the size of tensor b (200) at non-singleton dimension 1

Hi, have you solved this problem yet?