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

about the implement of sort error #12

Closed
FL77N opened this issue Dec 31, 2021 · 3 comments
Closed

about the implement of sort error #12

FL77N opened this issue Dec 31, 2021 · 3 comments

Comments

@FL77N
Copy link

FL77N commented Dec 31, 2021

according the paper, I can compute the $L_{ij}$ as following defined in Eq. 9:
微信截图_20211231155145
I notice that the implement of sort error in your code is as following:

# Compute sorting error on example ii
sorting_error[ii] = current_sorting_error - target_sorting_error

why not multiply the sort pmf? as following

sorting_error[ii] = (current_sorting_error - target_sorting_error)*missorted_examples/sorting_pmf_denom
@kemaloksuz
Copy link
Owner

Your expression seems correct. In terms of our implementation.

@FL77N
Copy link
Author

FL77N commented Jan 2, 2022

Thank you for the detailly reply! I notice that in the RankSortLoss/mmdet/models/losses/ranking_losses.py Line 87 in b41f64d sorting pmf is used to compute the gradient caused by the sort loss, however, (\ell_S(i)- \ell_S^*(i) should mutiply the sort pmf like the rank error. I clear that for the gradient of sort error is calculated correctly, the BP will be fine. Actually, Our final goal is the gradient.

@FL77N
Copy link
Author

FL77N commented Jan 4, 2022

Sry! I got it! We will compute the integral of (current_sorting_error - target_sorting_error)*sorting_pmf for sorting_error[ii], then sorting_error[ii] should equal (current_sorting_error - target_sorting_error) as same as in the paper.

@FL77N FL77N closed this as completed Jan 4, 2022
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