idstcv/InMaP

some question about the code

eriche2016 opened this issue · 2 comments

Hi, excellent work.
I am trying to understand your code. But I am very confused about the following lines of code:

https://github.com/idstcv/InMaP/blob/main/main.py#L289-L299

I roughly know that this code calculates the gradient of KL divergence to update the vision proxy iteratively.
However, I can not derive a formula to for it. Can you help me or give me some references?
Thanks in advance.

Thank you for your interest. By getting rid of the constant term, the loss can be degenerated to a cross-entropy loss with the soft label as in Theorem 2. Then, the standard gradient of the cross entropy loss can be applied, for which you can find the analysis for the cross entropy loss conveniently by google.

Thanks for your prompt response. I understand your point of replacing KL divergence with cross-entropy loss.