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

why add detach() ? #4

Open
manmaynakhashi opened this issue Jan 27, 2023 · 1 comment
Open

why add detach() ? #4

manmaynakhashi opened this issue Jan 27, 2023 · 1 comment

Comments

@manmaynakhashi
Copy link

why do you detach()

y_df_hat_r, y_df_hat_g, _, _ = mcmbd(y, y_g_hat.detach(), x2.detach(), x1.detach())

and not at
y_df_hat_r, y_df_hat_g, fmap_f_r, fmap_f_g = mcmbd(y, y_g_hat, x2, x1)

@rishikksh20

@v-nhandt21
Copy link

The Collaborative Multi-Band Discriminator in the line 130 is for updating the discriminator only, we take the detach to do copy to new tensor so that the generator don't get gradient.

In the line 148, we will update gradient for the generator

image

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