igul222 / improved_wgan_training

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

Error save_image.py when running gan_mnist.py #77

Open aaprile opened 6 years ago

aaprile commented 6 years ago

Hi there, I got this error when running gan_mnist.py :

File "C:\Users\adrien\Desktop\WGan P8\improved_wgan_training-master\tflib\save_images.py", line 31, in save_images img = np.zeros((h nh, w nw))

TypeError: 'float' object cannot be interpreted as an integer

I work with python 3.6 and update the files as i find in pullrequest.

Someone know how to fix this ? Thanks !

aaprile commented 6 years ago

I tried replacing : img = np.zeros((h nh, w nw)) by : img = np.zeros((int(h nh), int(w nw)))

but now i get this error :

File "C:\Users\adrien\Desktop\WGan P8\improved_wgan_training-master\tflib\save_images.py", line 37, in save_images img[jh:jh+h, iw:iw+w] = x

TypeError: slice indices must be integers or None or have an index method