AlexiaJM/relativistic-f-divergences

How to generate different size picture

Ahalang opened this issue · 4 comments

How to generate different size picture?I want to generate 128128, 256256, but i only can generate 32*32 picture. Thank you

Change "image_size".

when i run this command,
python3 GAN.py --loss_D 12 --image_size 64 --seed 1 --lr_D .0002 --lr_G .0002 --batch_size 32 --Diters 1 --arch 1 --beta1 .50 --beta2 .999 --CIFAR10 True --n_iter 100000 --gen_every 10000 --print_every 1000 --spectral True
i change image_size=64, This error occoured:
Traceback (most recent call last):
File "GAN.py", line 730, in
errD = torch.mean((y_pred - torch.mean(y_pred_fake) - y) ** 2) + torch.mean((y_pred_fake - torch.mean(y_pred) + y) ** 2)
RuntimeError: The size of tensor a (128) must match the size of tensor b (32) at non-singleton dimension 0

arch=1 can only do 32x32, arch=0 is less good (DCGAN) but can adapt to different image_size, it's the one I used for the cats. Also note that CIFAR-10 is 32x32 so you should not attempt higher image sizes than 32x32 on this dataset.

Thank you!