kabkabm / defensegan

Defense-GAN: Protecting Classifiers Against Adversarial Attacks Using Generative Models (published in ICLR2018)
Apache License 2.0
229 stars 62 forks source link

problem for nonetype #11

Open infinitr0us opened 5 years ago

infinitr0us commented 5 years ago

I ran the codes on my computer for python3 and tensorflow-gpu, but I found a trouble that: stddev=np.sqrt(1.0 / self.latent_dim)), TypeError: unsupported operand type(s) for /: 'float' and 'NoneType' In fact, the self.latent_dim is defined in the gan.py as a initial for None, Is it a problem for python3? Thanks a lot

infinitr0us commented 5 years ago

image images like this

xubo0321 commented 5 years ago

I ran the codes on my computer for python3 and tensorflow-gpu, but I found a trouble that: stddev=np.sqrt(1.0 / self.latent_dim)), TypeError: unsupported operand type(s) for /: 'float' and 'NoneType' In fact, the self.latent_dim is defined in the gan.py as a initial for None, Is it a problem for python3? Thanks a lot

You can print latent_dim, and see what type and format it is.