Closed varoudis closed 7 years ago
@varoudis : I came across the same error with the latest Theano. Removing all the BatchNormalization layers made it compile. However I was not able to achieve the same results - the error of GAN didn't converge. Have you been able to regenerate the results?
are you running on a CPU or GPU device under theano?
it's theano on GPU. It seems that the error was raised when there is a BatchNormalization after a Conv2D. So I disable the BatchNormalization, does that affect the performance. To be frank I have only run 2000 iterations, but GAN error never goes down below 2.
yes, batchnorm is pretty critical to making GANs work afaik - not sure why its breaking on the latest, I'll look into it when I get a chance
@osh : I dig a little bit. The error might be caused by PR #3529 at Keras. Using an explicit parameter axis=1
in H = BatchNormalization(mode=2, axis=1)(H)
seems to fix it. The default value of axis is -1.
Another quick question: it seems that you have commented off line 185 and 194. What's the rational behind it? Does it affect the performance? thanks!
Ah great, will have to make that change unless you want to submit a PR? I believe make_trainable() only matters at model.compile() time, thus doing it while looping through training was useless and was commented (should be deleted I suppose). Thus it shouldn't change anything -
Yes please go ahead to make the change.
On the trainable
setting, it seems that there has been some changes - the trainable takes affect at running time (1st calling fit) now - or I misunderstood it?
I also found the trainable
part confusing and have raised an issue. Hopefully someone can answer it.
Thanks for the great example.
If the behavior has changed we should put them back in for sure
just checked in update to MNIST_CNN_GAN_v2.ipynb which works with the latest Keras/TF.
Any ideas?