Changing the image size in DC GAN tutorial

Hi,
I am trying to generate images by following DC GAN tutorial in pytorch.
https://pytorch.org/tutorials/beginner/dcgan_faces_tutorial.html
This code works fine for image size = 64. But it give me the error when I change the image size to 128. Error is given below:
ValueError: Using a target size (torch.Size([128])) that is different to the input size (torch.Size([3200])) is deprecated. Please ensure they have the same size.

Please guide me how I can change the image size in this tutorial.

Best

I assume this is a typo and you are increasing the image size?
If so, then I would guess that the Discriminator is not returning logits for each sample only but might return a 4-dimensional tensor with a specific spatial size which then won’t match the targets.
In this case, you might need to e.g. add more layers to the Discriminator or use more aggressive pooling.

Hi @ptrblck,
Thanks for your answer. Yes, it was typo. I will try after adding more layers.