toward-controlled-generation-of-text-pytorch
toward-controlled-generation-of-text-pytorch copied to clipboard
Calculate the gradient of encoder in VAE correctly
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.
You got the retain_graph error right ? What happened when you just set it to true ?