Open wtishere opened 10 months ago
I've never had this happen before. It should mean that the features from the encoder are extremely correlated. Is it a weird image pair?
Thanks for your reply. I have no idea whether it has a weird image. I used the megadepth dataset and followed your steps to form data structure. Do you have any idea to solve this problem?
This seems to happen during the benchmark. You should be able to see the names of the images being sent in. If so I can check if Im able to reproduce the issue.
Otherwise Im not sure how to help.
I have encountered the same Error, also used megadepth for training. But I got something new: the loss value became 0 at some step, and then the Error raised. I think the loss value leads to the Error. But I do not know why loss value became zero suddenly. The most wired thing is that: I run the code twice. At the first run , it goes without any error. But at the second run (the exactly same code and devices), the loss became 0 and there raised an Error: torch._C._LinAlgError: torch.linalg.inv: (Batch element 0): The diagonal element 1 is zero, the inversion could not be completed because the input matrix is singular.
If its the megadepth training set we don't use seeds so it might be different image pairs etc. You might reduce the risk of this happening by increasing the diagonal term that we add here https://github.com/Parskatt/DKM/blob/d1cba4bf1c96de1497aba031f709013404c08d5f/dkm/models/dkm.py#L355
Thanks for your quick reply. I will try to increase the diagonal term to reduce the risk.
获取 Outlook for iOShttps://aka.ms/o0ukef
发件人: Johan Edstedt @.> 发送时间: Wednesday, January 31, 2024 10:57:46 PM 收件人: Parskatt/DKM @.> 抄送: MantangGuo @.>; Comment @.> 主题: Re: [Parskatt/DKM] torch.linalg.inv (Issue #45)
If its the megadepth training set we don't use seeds so it might be different image pairs etc. You might reduce the risk of this happening by increasing the diagonal term that we add here https://github.com/Parskatt/DKM/blob/d1cba4bf1c96de1497aba031f709013404c08d5f/dkm/models/dkm.py#L355
― Reply to this email directly, view it on GitHubhttps://github.com/Parskatt/DKM/issues/45#issuecomment-1919274355, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AOC6HZTE6HJBKMFTCQOCFSLYRJLWVAVCNFSM6AAAAAA5Z6APC6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMJZGI3TIMZVGU. You are receiving this because you commented.Message ID: @.***>
Thanks for your excellent work! May I ask for one possible solution for the problem shown as below? Thank you so much!