nanguoshun / LSR

Pytorch Implementation of our ACL 2020 Paper "Reasoning with Latent Structure Refinement for Document-Level Relation Extraction"
127 stars 22 forks source link

inquiry about L_ij_bar, singular U. #22

Open FayeXXX opened 4 years ago

FayeXXX commented 4 years ago

Thanks for ur excellent work. There is a RuntimeError when running at line 72:LLinv = torch.inverse(L_ij_bar) in reasoner.py:

RuntimeError: inverse_cuda: For batch 24: U(68,68) is zero, singular U.

I think it may because that the determinant of L_ij_bar is zero. How can i fix it? Looking forward to ur reply.

nanguoshun commented 4 years ago

Hi @FayeXXX , thanks for your question. It is a bug and you may try to use a different bath size to avoid this problem. I will try to fix this issue in the future as we are now rushing to some deadlines. Thanks

slzbywdf commented 3 years ago

Hi, I met the same problem, do you have any solutions?

nanguoshun commented 3 years ago

hi @slzbywdf, thanks for your feedback. The simplest way is to use a different batch size or different lr to avoid this problem. I will fix this issue in the future but so far the above solution can help you to run it normally. Thanks a lot!