-
Notifications
You must be signed in to change notification settings - Fork 0
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
[WIP] Integrates JorgeKFAC with diffusion model training script #3
base: jorge
Are you sure you want to change the base?
Conversation
|
improved_diffusion/respace.py
Outdated
terms["loss_sampled"] = mean_flat((y_sampled - model_output) ** 2) | ||
if "vb" in terms: | ||
terms["loss"] = terms["mse"] + terms["vb"] | ||
# TODO: Should terms["vb"] be added to terms["loss_sampled"]? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should terms["vb"]
be added to terms["loss_sampled"]
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most likely "vb" shouldn't be in terms. Can you check and let me know?
loss_sampled = (losses["loss_sampled"] * weights).mean() | ||
loss_sampled.backward(retain_graph=True) | ||
self.opt.acc_stats = False | ||
self.opt.zero_grad() # clear the gradient for computing true-fisher | ||
|
||
if isinstance(self.schedule_sampler, LossAwareSampler): | ||
self.schedule_sampler.update_with_local_losses( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand what L233 (self.schedule_sampler.update_with_local_losses
) does. Should anything here be modified to do similar for losses["loss_sampled"]?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need to use the proxy loss (i.e. loss_sampled) anywhere in this function. This can remain untouched.
No description provided.