tensorflow-MNIST-GAN-DCGAN icon indicating copy to clipboard operation
tensorflow-MNIST-GAN-DCGAN copied to clipboard

The wrong dimension in discriminator function

Open ShanHaoYu opened this issue 7 years ago • 5 comments

I found it there is a bug in discriminator function on tensorflow_MNIST_GAN.py.

The Original code is below: w2 = tf.get_variable('D_w2', [h1.get_shape()[1], 256], initializer=w_init) b2 = tf.get_variable('D_b2', [1024], initializer=b_init)

it should be modified as: w2 = tf.get_variable('D_w2', [h1.get_shape()[1], 256], initializer=w_init) b2 = tf.get_variable('D_b2', [256], initializer=b_init)

Many Thanks.

ShanHaoYu avatar Dec 20 '17 09:12 ShanHaoYu

Had the same bug, thx for posting, didn't feel like debugging dimension mismatches today ;p

aiXander avatar Dec 22 '17 15:12 aiXander

One extra thing: for people that are running Linux on Windows 10 (using developer mode): To be able to execute the show_result function you can install something like Xming and then use export DISPLAY=:0 to patch the results through!

aiXander avatar Dec 22 '17 15:12 aiXander

wx20180703-220009 2x

Change the original code 1024 to 256 will be just fine.

VictorZhang2014 avatar Jul 03 '18 14:07 VictorZhang2014

Hey I changed the size to 256 as mentioned but I am getting an error like this: ValueError: Trying to share variable D/D_b2, but specified shape (256,) and found shape(1024,)

Any idea on this??!!

vpshah3 avatar Mar 10 '19 22:03 vpshah3

same @vpshah3

simk10 avatar Dec 19 '19 11:12 simk10