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

InfoGAN can not run because of the pytorch version problem #34

Open
Sun-Happy-YKX opened this issue Apr 11, 2022 · 1 comment
Open

InfoGAN can not run because of the pytorch version problem #34

Sun-Happy-YKX opened this issue Apr 11, 2022 · 1 comment

Comments

@Sun-Happy-YKX
Copy link

/home/yangkaixing/miniconda3/envs/GASDA/lib/python3.6/site-packages/torch/nn/functional.py:1806: UserWarning: nn.functional.sigmoid is deprecated. Use torch.sigmoid instead.
warnings.warn("nn.functional.sigmoid is deprecated. Use torch.sigmoid instead.")
Traceback (most recent call last):
File "main.py", line 112, in
main()
File "main.py", line 104, in main
gan.train()
File "/data/yangkaixing/Generative_Model_Collections/infoGAN.py", line 230, in train
info_loss.backward()
File "/home/yangkaixing/miniconda3/envs/GASDA/lib/python3.6/site-packages/torch/_tensor.py", line 307, in backward
torch.autograd.backward(self, gradient, retain_graph, create_graph, inputs=inputs)
File "/home/yangkaixing/miniconda3/envs/GASDA/lib/python3.6/site-packages/torch/autograd/init.py", line 156, in backward
allow_unreachable=True, accumulate_grad=True) # allow_unreachable flag
RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation: [torch.cuda.FloatTensor [64, 3, 4, 4]] is at version 2; expected version 1 instead. Hint: enable anomaly detection to find the operation that failed to compute its gradient, with torch.autograd.set_detect_anomaly(True).

@gnlup
Copy link

gnlup commented Apr 3, 2024

Have you solved it yet? I have come across the same question.

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