igul222 / improved_wgan_training

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

Dimension Error in gan_language.py #49

Open georgiazhang opened 6 years ago

georgiazhang commented 6 years ago

Hi, guys I'm running gan_language.py on CPU with python2.7 tf1.0 since our GPU work station doesn't work. I have fixed the NHWC problem as said in Issue 11, except the last comment about 1 gan_mnist.py the output tensor in Discriminator should be changed from output = tf.reshape(inputs, [-1, 1, 28, 28]) to output = tf.reshape(inputs, [-1, 28, 28, 1]) 2 conv2d.py from strides = [1, 1, stride, stride] to strides = [1, stride, stride, 1]

Then I get the following error: ValueError: Dimensions must be equal, but are 32 and 512 for 'Generator.1.1/conv1d/Conv2D' (op: 'Conv2D') with input shapes: [64,1,512,32], [1,5,512,512] Can anyone tell me how to fix the problem? Thank you very much!