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 Stereo Selective Whitening Loss. #8

Open
Zhaohuai-L opened this issue Oct 12, 2022 · 2 comments
Open

About the Stereo Selective Whitening Loss. #8

Zhaohuai-L opened this issue Oct 12, 2022 · 2 comments

Comments

@Zhaohuai-L
Copy link

Zhaohuai-L commented Oct 12, 2022

Hi , Thanks a lot for your great work,I mitigated SSW and SCF to my own Project with similar backbone. But the SSW loss is a NAN, so I debuged it and found it's 'num_sensitive_sum' being zero after ‘mask_matrix’ multiplied by self.reversal_eye.
Even if I set 'num_sensitive_sum' to 0.0001 , the SWW loss becomes zero too.

Is there a bug here or am I understanding it wrong?

            mask_matrix = mask_matrix.view(B, -1)
            for midx in range(B):
                mask_matrix[midx][indices] = 1
            mask_matrix = mask_matrix.view(B, self.dim, self.dim)
            mask_matrix = mask_matrix * self.reversal_eye
            num_sensitive_sum = torch.sum(mask_matrix)
            if num_sensitive_sum==0:
                num_sensitive_sum=0.0001
@jiaw-z
Copy link
Owner

jiaw-z commented Nov 15, 2022

Sorry to reply late. num_sensitive_sum sums the number of pixels that are sensitive to viewpoint changes. In our experiments, we did not observe cases in that num_sensitive_sum equals zero. And it is not proper to set num_sensitive_sum to 0.0001 as it is an integer.

@Zhaohuai-L
Copy link
Author

Ok, thanks for your reply.

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