Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Supervision loss in code and paper #4

Open
leilai125 opened this issue Feb 16, 2023 · 3 comments
Open

Supervision loss in code and paper #4

leilai125 opened this issue Feb 16, 2023 · 3 comments

Comments

@leilai125
Copy link

Hi, thanks for your work. It's very interesting. I realized that during supervision part, the loss function is different between the code and paper, right? In the paper, the loss function for supervision is simple (negative log likelihood of the groundtruth rotation in the predicted distributions). Why the loss function in the code is different? Does this loss function (in the code) have been mentioned in the paper?

Thanks!

@yd-yin
Copy link
Owner

yd-yin commented Feb 16, 2023

Hi, thanks for your interest.

The supervised loss in the code is the negative log-likelihood, the same as the paper. It is defined at https://github.com/yd-yin/FisherMatch/blob/main/fisher/fisher_utils.py#L19

Why do you think it is different from the paper?

@leilai125
Copy link
Author

leilai125 commented Feb 16, 2023

Hi I think I am a bit confused about the code is because it looks a bit different from the function (6) in the paper. What does log_exponent, overreg, log_normalizer represent respectively? I thought loss function will look like: -log(MF(y, A))

I also run the code using this loss function, the return loss is around negative 5. Is this normal? Loss is usually set to be positive (negative is fine as well), just want to double check

I think it might because I am not familiar with fisher matrix distribution. Hope you will provide some explanation to the code here: https://github.com/yd-yin/FisherMatch/blob/main/fisher/fisher_utils.py#L19

Thanks!

@yd-yin
Copy link
Owner

yd-yin commented Feb 19, 2023

Given $p(R;A) = \frac{1}{F(A)}\exp(tr(A^TR))$, $-\log(p)=\log(F(A))-tr(A^TR)$, log_normalizer is $\log(F)$, log_exponent is $-tr(A^TR)$. overreg is very close to 1, which is used to better stabilize the training. This term is proposed in [1] (see last paragraph of section 3.2 in [1]) and I leave it as is.

It's normal. $-\log(p)$ will be negative if $p$ is larger than 1. (Note that $p$ is pdf, not probability)

[1] Probabilistic orientation estimation with matrix Fisher distributions. NeurIPS 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants