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

Regarding training of classifier #5

Open
adithyaiyer1999 opened this issue Nov 14, 2023 · 2 comments
Open

Regarding training of classifier #5

adithyaiyer1999 opened this issue Nov 14, 2023 · 2 comments

Comments

@adithyaiyer1999
Copy link

Hi! Thank you for such readable code - I had one question wrt the training process.

In Line 322, and Line 327 of train_util.py (the forward backward function), you select 2 sets of time-steps one with t =0, and one with t sampled from the diffusion steps. You also correctly associate both of these to the clean image and noisy image respectively.

My qs is : Why are you using 2 separate sets of images (a clean set, and noisy set), and concatenating them to train the classifier on the batch?

Thanks in advance!

@GuoQiushan
Copy link
Owner

Thanks for your interest in our work. We use the clean set for a better classification performance, since the noisy set contribute less to the clean classification performance.

@adithyaiyer1999
Copy link
Author

adithyaiyer1999 commented Nov 28, 2023

Thanks for your reply, that makes sense. I had another qs along the same line.

In eq 10
$\nabla_{x_t} \log q(x_t | x_0) = - \frac{\epsilon_t}{\sqrt{1 - \bar{\alpha}_t}}$

i.e., the score is related to epsilon with a scaling factor of $\sqrt{1 - \bar{\alpha}_t}$.

When you create the denoising training loss (i.e. fisher divergence, in Algorithm 1 in the paper, you add the score from $\epsilon$. I was wondering, would we not have to multiply score by the scaling factor and then get the MSE ?

Thanks again for the clarifications!

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