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

Getting errors in running the code with python3 #3

Open
stilllearningsoumya opened this issue May 1, 2022 · 1 comment
Open

Getting errors in running the code with python3 #3

stilllearningsoumya opened this issue May 1, 2022 · 1 comment

Comments

@stilllearningsoumya
Copy link

While running the code in python3 environment, I am getting this error -- RuntimeError: Mismatch in shape: grad_output[0] has a shape of torch.Size([1]) and output[0] has a shape of torch.Size([]).

Any help in this regard will be highly appreciated. Thanks in advance.

@dars16
Copy link

dars16 commented May 10, 2022

Thanks to jalola/improved-wgan-pytorch#11 (comment), the solution is to replace line 185 in klcpd.py with one = torch.tensor(1, dtype=torch.float)

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