clvrai / ACGAN-PyTorch

MIT License
268 stars 62 forks source link

Error while running on CIFAR-10 #6

Open singlepoint opened 6 years ago

singlepoint commented 6 years ago

UserWarning: Using a target size (torch.Size([1])) that is different to the input size (torch.Size([16])) is deprecated. Please ensure they have the same size. "Please ensure they have the same size.".format(target.size(), input.size())) Traceback (most recent call last): File "main.py", line 188, in dis_errD_real = dis_criterion(dis_output, dis_label) File "/home/.../envs/python36/lib/python3.6/site-packages/torch/nn/modules/module.py", line 325, in call result = self.forward(*input, **kwargs) File "/home/.../envs/python36/lib/python3.6/site-packages/torch/nn/modules/loss.py", line 372, in forward size_average=self.size_average) File "/home/.../envs/python36/lib/python3.6/site-packages/torch/nn/functional.py", line 1171, in binary_cross_entropy "!= input nelement ({})".format(target.nelement(), input.nelement())) ValueError: Target and input must have the same number of elements. target nelement (1) != input nelement (16)

thnkim commented 6 years ago

add an option, --imageSize 32 when you run it.

ygjwd12345 commented 5 years ago

add an option, --imageSize 32 when you run it.

why we must set the image size as 32, the paper said the imagesize is 128128/6464. How can I fix the imagesize?