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

Glead loss computed more than necessary in Dreg phase #2

Open
Alaa-Arbi opened this issue Jul 14, 2023 · 1 comment
Open

Glead loss computed more than necessary in Dreg phase #2

Alaa-Arbi opened this issue Jul 14, 2023 · 1 comment

Comments

@Alaa-Arbi
Copy link

In loss_glead.py in line 207. if do_Dmain or do_Dr1:. My understanding is that this if block is supposed to compute the GAN loss for the real images + the glead regularization loss and or the R1 regularization loss. And I guess that if only R1 regularization is wanted (meaning do_Dmain is False then neither the gan loss nor the glead regularization loss is supposed to be computed. While in fact the GAN loss is not computed (line 231 if do_Dmain: ), the glead loss is still computed one extra time (one more time than for fake images). So my question is whether this was or wasn't intentional.

@EzioBy
Copy link
Owner

EzioBy commented Aug 3, 2023

Hi. Firstly, I think the glead loss in D_reg phase is not duplicated to the one in D_main phase because the discriminator weights would be updated after D_main phase. And incorporating the glead loss in D_reg phase may alleviate the influence of R1 penalty on the glead strategy. Yet I did not conduct systematic ablation studies on this.

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