igul222 / improved_wgan_training

Code for reproducing experiments in "Improved Training of Wasserstein GANs"
MIT License
2.35k stars 668 forks source link

Two bugfixes, improved err msg, and whitespace removal #63

Open catherio opened 6 years ago

catherio commented 6 years ago

Two bugfixes:

Improved error message explaining how to download CIFAR-10

Whitespace removal (sorry, my editor does this automatically, and I assume you don't mind)

igul222 commented 6 years ago

Thanks for the PR :) Re. the Inception Score changes, are those bugs also present in the canonical implementation (https://github.com/openai/improved-gan/blob/master/inception_score/model.py)? If so then I'm hesitant to change because enough people have reported results with them that they're de-facto part of the eval metric now.

catherio commented 6 years ago

Ah, I hadn't realized this code was almost verbatim copied from the openai version. Yes, these two bugs are also there. They're not the type of bugs that cause the score to be different, though, they're stacktrace errors that mean the program just doesn't run (anymore?). I'll go file this same PR against their implementation and see what they say.

catherio commented 6 years ago

PR on the canonical implementation is here: https://github.com/openai/improved-gan/pull/31

catherio commented 6 years ago

FYI, the changes proposed are now also in the canonical model. No numerical or semantic changes, merely compatibility. https://github.com/openai/improved-gan/pull/31

wchen342 commented 6 years ago

The o.set_shape(tf.TensorShape(new_shape)) part actually doesn't work (Tensorflow won't allow you to change the first dimension to None), and that's why you need bs=1 instead of 100. I suggest using o.shape.dims[0] = tf.Dimension(None) instead. See https://github.com/wchen342/SketchyGAN/commit/f8fe961044da245c4f3fb812772c7a6f0a564dc4.

farhodfm commented 4 years ago

@catherio Thank you for your changes!