martinarjovsky / WassersteinGAN

BSD 3-Clause "New" or "Revised" License
3.2k stars 725 forks source link

how to train a 256*128 image dataset and output 256*128 result? #63

Open GuiQuLaiXi opened 5 years ago

GuiQuLaiXi commented 5 years ago

parser.add_argument('--imageSize', type=int, default=64, help='the height / width of the input image to network') the default imagesize is 6464?how to define a new image size like mn

zyoohv commented 5 years ago

If you want to train with 256*128 images, you must change the structure of the network.

For example, the code use (2, 2) step, you need change it to (2, 1):

self.main.add_module('initial_conv_{}'.format(ch), nn.Conv2d(3, ch, (2, 1), (2, 1), 0, bias=bias))

Than you can produce the images with size of 256*128。

GuiQuLaiXi commented 5 years ago

If you want to train with 256*128 images, you must change the structure of the network.

For example, the code use (2, 2) step, you need change it to (2, 1):

self.main.add_module('initial_conv_{}'.format(ch), nn.Conv2d(3, ch, (2, 1), (2, 1), 0, bias=bias))

Than you can produce the images with size of 256*128。

thank you ,but the default input imagesize is NxN,do i need to change something else?

zyoohv commented 5 years ago

@GuiQuLaiXi

Yes, all you need to change are the layers both in generator and discriminator.

What's more, you may need to prepare your dataloader which produces the images with shape of 256*128.