ilguyi / dcgan.tensorflow

14 stars 4 forks source link

Question about output size #1

Open 5p4m3r opened 7 years ago

5p4m3r commented 7 years ago

Is it possible to have some control about the output size or is 64x64 fixed? I am looking towards getting 200x200 or higher.

thx

ilguyi commented 7 years ago

If you change the architecture of Generator then you can get the various size of image. In my program notations

output size in each layer of Generator input random_z: 100 dim layer1: 4 x 4 x 512 layer2: 8 x 8 x 256 layer3: 16 x 16 x 128 layer4: 32 x 32 x 64 layer5: 64 x 64 x 3 (RGB channels)

In my opinion, you can add more layer (conv2d_transpose) then you can get bigger size images. But, there are some cautions in this modificaiton.

  1. I think the image size of dataset you have should be equal as the image size you want to get.
  2. You should change both Discriminator and Generator appropriately.
  3. The stride size of Generator I use is [2, 2], this means the image get bigger exactly double as passing the layer. So you want specific image size, you change stride size or kernel size or both appropriately.

Thank you.