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 re-weighted loss #5

Open
thuxmf opened this issue Dec 30, 2022 · 3 comments
Open

About the re-weighted loss #5

thuxmf opened this issue Dec 30, 2022 · 3 comments

Comments

@thuxmf
Copy link

thuxmf commented Dec 30, 2022

weight = _extract_into_tensor(1 / (self.p2_k + self.snr)**self.p2_gamma, t, target.shape)

I found that you use the weight to multiply on the final loss, in which the denominator is greater than 1 since self.p2_k >= 1 and self.snr > 0 . Therefore, weight is smaller than 1. I wonder how to achieve the result that the total weights of your method is greater than the baseline of DDPM when the SNR is in the interval [1e-2, 1e0]?
截屏2022-12-30 14 43 36

@jychoi118
Copy link
Owner

Above plot shows the normalized weights, where the sum of the weights is 1. The plot without normalization is shown in the appendix. Here, weights are smaller than the baseline as you expected.
image

@thuxmf
Copy link
Author

thuxmf commented Dec 30, 2022

Thanks!

@HaoLyou
Copy link

HaoLyou commented Oct 3, 2023

Why is the numerator 1 in the code, not the lambda mentioned in the paper?

weight = _extract_into_tensor(1 / (self.p2_k + self.snr)**self.p2_gamma, t, target.shape)

I found that you use the weight to multiply on the final loss, in which the denominator is greater than 1 since self.p2_k >= 1 and self.snr > 0 . Therefore, weight is smaller than 1. I wonder how to achieve the result that the total weights of your method is greater than the baseline of DDPM when the SNR is in the interval [1e-2, 1e0]?
截屏2022-12-30 14 43 36

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

3 participants