Open mingo-x opened 3 years ago
Hi mingo-x, you can combine two losses (g_loss, w_rec_loss) together. I think there is no huge difference.
However, you should be aware that w_rec_loss only affects the encoder, not the generator in the original version. Your modification makes w_rec_loss also affect the update of the generator.
Lastly, if you didn't modify any training code, I don't know why RuntimeError occurs. Please check your torch version.
I also ran into this error. Hi @mingo-x, have you solved it?
PyTorch 1.8 is working for me, version 1.10 is not.
@songquanpeng backward(retain_graph=True), solved it.
Hi there, thanks so much for sharing the codes - really amazing work!
When I was trying to train the model on my own, I ran into an error at line 383 in
train.py
((w_rec_loss * args.lambda_w_rec_loss).backward()
) thatI read the model definition and the implementation looked correct to me - so I don't understand why such error was thrown. Do you maybe have any idea what could have gone wrong?
In the meanwhile, to unblock myself, I modified the codes a bit to run
backward()
forg_loss
andw_rec_loss
in one go (g_w_rec_loss
in the following example). Does this modification make sense to you? Why did you separate thebackward
operation in the first place?Thanks in advance for your help!