-
Notifications
You must be signed in to change notification settings - Fork 23
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
Error while running it in Pytorch 1.7 #2
Comments
It seems that that error appears due to using the same variables that require grad after implementing opt_GE.step() |
@Hong753 Could you please paste the exact code how you solved this issue (and where the code should be pasted)? I am really struggling in migrating to pytorch from Keras and I would like to reproduce these results before even attempting to modify the code for other cases. Thank you |
@djsavic I have fixed it in the following way: d_c = copy.deepcopy(discriminator) x, y = batch Then I calculated pred_real and pred_fake using this copy Now the code runs without errors and produces the results from the paper. |
Issue: Cluster GAN existing code doesn't work in Pytorch 1.7
Disclaimer: I know there is nothing wrong with the code or implementation you've written. But any help on this would be appreciated.
The following steps work in Pytorch 1.0 but not in torch 1.7.0+cu101
The generator and the encoder are updated together and the discriminator is updated separately.
The following is done for each batch of images
The above code works fine in torch 1.0 but torch 1.7 throws the following error.
The error seems to be resolved when I do
or
However, the results after doing the above changes aren't matching up with the results of the code run in torch 1.0
The text was updated successfully, but these errors were encountered: