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

运行出错python gan_demo.py --cpu inputs/zig.jpg #33

Open
maxbest opened this issue Jul 26, 2019 · 1 comment
Open

运行出错python gan_demo.py --cpu inputs/zig.jpg #33

maxbest opened this issue Jul 26, 2019 · 1 comment

Comments

@maxbest
Copy link

maxbest commented Jul 26, 2019

$ python gan_demo.py --cpu inputs/zig.jpg
C:\Users\Administrator\Anaconda3\envs\torchcpu\lib\site-packages\torch\nn\functional.py:1386: UserWarning: nn.functional.sigmoid is deprecated. Use torch.sigm
oid instead.
warnings.warn("nn.functional.sigmoid is deprecated. Use torch.sigmoid instead.")
C:\Users\Administrator\Anaconda3\envs\torchcpu\lib\site-packages\torch\nn\modules\loss.py:512: UserWarning: Using a target size (torch.Size([2000])) that is d
ifferent to the input size (torch.Size([2000, 1])) is deprecated. Please ensure they have the same size.
return F.binary_cross_entropy(input, target, weight=self.weight, reduction=self.reduction)
Traceback (most recent call last):
File "gan_demo.py", line 88, in
loss_d_real = d_real_loss.data.cpu().numpy()[0] if cuda else d_real_loss.data.numpy()[0]
IndexError: too many indices for array

@allenu2
Copy link

allenu2 commented May 2, 2020

I have a similar problem, did you solve it?

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