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 reain_graph is needed here ? #96

Open
LeoniusChen opened this issue Feb 8, 2021 · 1 comment
Open

Why reain_graph is needed here ? #96

LeoniusChen opened this issue Feb 8, 2021 · 1 comment

Comments

@LeoniusChen
Copy link

LeoniusChen commented Feb 8, 2021

Hi, I read the GAN code and I have the confusion that why the retain_graph is needed here ?

D_loss.backward(retain_graph=True) # reusing computational graph

The computation graph of discriminator should not be released ?

@yangquanli
Copy link

have the same doubts.

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