caogang / wgan-gp

A pytorch implementation of Paper "Improved Training of Wasserstein GANs"
MIT License
1.51k stars 346 forks source link

发生了一个错误 #33

Open fmbao opened 6 years ago

fmbao commented 6 years ago

博主,你好,你的代码很棒。但是我在运行你的代码时发生了一个错误: Traceback (most recent call last): File "G:\desktop\myProject\WGAN_gp\gan_mnist.py", line 253, in <module> generate_image(iteration, netG) File "G:\desktop\myProject\WGAN_gp\gan_mnist.py", line 119, in generate_image 'tmp/mnist/samples_{}.png'.format(frame) File "G:\desktop\myProject\WGAN_gp\tflib\save_images.py", line 36, in save_images img[j*h:j*h+h, i*w:i*w+w] = x ValueError: could not broadcast input array from shape (28,28) into shape (26,28) 这是为什么呢?百思不得其解,还请博主不吝赐教!

prfans commented 5 years ago

j = int(j) i = int(i)