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

Inconsistency for contribution calculation between forward and backward pass? #1130

Open
Developer-KS opened this issue Jan 6, 2025 · 2 comments

Comments

@Developer-KS
Copy link

Developer-KS commented Jan 6, 2025

While going through the forward and backward cuda code in the diff-gaussian-rasterization module, I seem to find a slight inconsistency between the two passes (or maybe I have been mistaken). See the following two screenshot:

20250106105244

20250106105855

The first one is the forward pass and the second one is the backward pass. It seems the last contributor gaussian's (1- alpha) is not recorded in the final_T value in the forward pass while still being accounted for in the backward pass. Is this a mistake, or am I missing something here?

Also, why do we need this "test_T" in the forward pass anyway? Isn't it more clear to use T's value for the testing directly?

@Developer-KS
Copy link
Author

By the way, this will have a larger impact when someone changes the T threshold to a larger value or uses an alpha clipping threshold that's closer to 1.0f, i.e. when the last contributor's contribution is significant.

@flm8620
Copy link

flm8620 commented Jan 21, 2025

I think there is no bug in the code. When the forward pass skips, it actually skips the 1 over the last contributor, and the assignment last_contributor = contributor is not executed when the loop is continued.

The code is indeed confusing. But the effect is correct. if the check test_T < 0.0001 is true, and we know alpha <= 0.99, then we have T * (1-0.99) < 0.0001, so T < 0.01, which is negligible.

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