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

Calculate the gradient of encoder in VAE correctly #7

Open
GBLin5566 opened this issue Dec 17, 2017 · 1 comment
Open

Calculate the gradient of encoder in VAE correctly #7

GBLin5566 opened this issue Dec 17, 2017 · 1 comment
Assignees

Comments

@GBLin5566
Copy link
Owner

https://github.com/GBLin5566/toward-controlled-generation-of-text-pytorch/blob/master/train.py#L270-L274
Calculating the extra loss (Line 272) with vae loss(Line 274) would trace the gradient of the graph twice, as a result it triggers the error msg.

@jonzarecki
Copy link

You got the retain_graph error right ? What happened when you just set it to true ?

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