IBM/BAGAN

Is normalization for CIFAR10 correct?

Closed this issue · 1 comments

Hi,
Thank for your great work!

I would like to correct a little bit

In BatchGenerator you normalize the images by
img = img / 255 - 0.5

but in function save_image_array() , you recover it by
img = (img * 127.5 + 127.5).astype(np.uint8)

it leads to a little difference.

  • image from generator
    image
  • image from dataset
    image

Seems like we want to normalize between -1 and 1
In BatchGenerator It should be: img = (img - 127.5) / 127.5

Thanks

Thank you for your bug fix. We have merged into master.