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

Question about Eq. (4) and VP SDE implementation #44

Open
SuwoongHeo opened this issue Apr 11, 2023 · 1 comment
Open

Question about Eq. (4) and VP SDE implementation #44

SuwoongHeo opened this issue Apr 11, 2023 · 1 comment

Comments

@SuwoongHeo
Copy link

Hi,

In the paper, the sampling equation of VP SDE (=: DDPM) differs from the DDPM's form. Specifically, the multiplicand to the score function is defined as $\beta_i$ while DDPM uses $(1-\alpha_t)/(\sqrt{1-\bar{\alpha_t}})$. It seems that the code in the repo originally intended to use $\bar{\alpha_t}$ since it is initialized (but not used) as can be seen in the below snippet. Can you provide me reason for this difference?

self.alphas_cumprod = torch.cumprod(self.alphas, dim=0)

@prithuls
Copy link

Hi, I am just starting to work on this repo code. I noticed the authors defined different loss functions. If we are to use DDPM loss function, we would need self.alphas_cumprod that you mentioned. If you check the following lines, i.e.

sqrt_1m_alphas_cumprod = vpsde.sqrt_1m_alphas_cumprod.to(batch.device)

This self.sqrt_1m_alphas_cumprod has been later used in losses.py to get DDPM loss function i.e.

sqrt_1m_alphas_cumprod = vpsde.sqrt_1m_alphas_cumprod.to(batch.device)
.

P.S. I am not sure why the loss SDE function is that way though.

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