andrewgordonwilson / bayesgan

Tensorflow code for the Bayesian GAN (https://arxiv.org/abs/1705.09558) (NIPS 2017)
Other
1.02k stars 176 forks source link

Type error in semisupervised code #10

Closed whilo closed 6 years ago

whilo commented 6 years ago

I am struggeling to run your semi-supervised code on CIFAR. I have followed the README and set up tensorflow in conda accordingly with correct versions. When I run (as close as possible from the README):

./run_bgan_semi.py --data_path ./datasets/ --dataset cifar --num_gen 10 --num_mcmc 2 --out_dir cifar_out --train_iter 100000 --N 4000 --lr 0.0005

I get:

Iter 100
d_losses: [None]
disc_info: [None, None, 7.3618059, 7.3462958]
Traceback (most recent call last):
  File "./run_bgan_semi.py", line 419, in <module>
    b_dcgan(dataset, args)
  File "./run_bgan_semi.py", line 214, in b_dcgan
    print "Disc losses = %s" % (", ".join(["%.2f" % dl for dl in d_losses]))
TypeError: float argument required, not NoneType

This only happens at the 100th iteration (and I have printed the respective variables to show that there are unexpected Nones in there), so I guess the None types in the d_losses are not a problem before. Any ideas? Thanks for any help :).

hjyai94 commented 6 years ago

I have the same problem, how do you fix it?

whilo commented 6 years ago

I have given up, but I would still be interested in a solution.

hjyai94 commented 6 years ago

When you ran this script below, did you have any error? `./run_bgan.py --data_path --dataset svhn --numz 10 --num_mcmc 2 --out_dir

--train_iter 75000 --save_samples --n_save 100`
ysaatchi commented 6 years ago

Thanks for pointing this out! This bug is now fixed :)