We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
for x_, _ in train_loader: # train discriminator D D.zero_grad() x_ = x_.view(-1, 28 * 28) mini_batch = x_.size()[0]
When I tried to run these lines, it showed me " output with shape [1, 28, 28] doesn't match the broadcast shape [3, 28, 28]" and I don't know why.
Could you help me to fix this bug?
And by the way, in the loop "for x_, _ in train_loader", what is the structure of x_ and ? I could not get the meaning of x and _
I am new to GAN. Thanks!
The text was updated successfully, but these errors were encountered:
@bignightcat Replace
# data_loader img_size = 64 transform = transforms.Compose([ transforms.Scale(img_size), transforms.ToTensor(), transforms.Normalize(mean=(0.5,0.5,0.5), std=(0.5,0.5,0.5)) ])
with
# data_loader img_size = 64 transform = transforms.Compose([ transforms.Scale(img_size), transforms.ToTensor(), transforms.Normalize(mean=[0.5], std=[0.5]) ])
x_ represents a batch of images and _ represents their respective labels with which we aren't bothered about.
Sorry, something went wrong.
No branches or pull requests
When I tried to run these lines, it showed me " output with shape [1, 28, 28] doesn't match the broadcast shape [3, 28, 28]" and I don't know why.
Could you help me to fix this bug?
And by the way, in the loop "for x_, _ in train_loader", what is the structure of x_ and ? I could not get the meaning of x and _
I am new to GAN. Thanks!
The text was updated successfully, but these errors were encountered: