DCGAN-tensorflow
DCGAN-tensorflow copied to clipboard
crash after recent commits: assert manifold_w * manifold_h == num_images
Got problem while saving the samples:
Traceback (most recent call last):
File "main.py", line 97, in <module>
tf.app.run()
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/platform/app.py", line 48, in run
_sys.exit(main(_sys.argv[:1] + flags_passthrough))
File "main.py", line 80, in main
dcgan.train(FLAGS)
File "/home/prota/Downloads/DCGAN-tensorflow-master/model.py", line 298, in train
save_images(samples, image_manifold_size(samples.shape[0]),
File "/home/prota/Downloads/DCGAN-tensorflow-master/utils.py", line 249, in image_manifold_size
assert manifold_w * manifold_h == num_images
AssertionError
manifold_w == 8 while manifold_h == 64. should be both 8 if images are 64?
I suppose there is also a pull request for this.
hi , I meet this problem also,do you find way to solve this problem?
ha I find it! the batch_size must be set as n * n,such as 16(4 * 4),64(8*8,default)or other. otherwise the assert will throws the exception. but I don't know why.
Replying to a very old topic here, but I wanted to quickly document this solution for the issue. I'm working on implementing another project that is based on DCGAN-tensorflow.
ha I find it! the batch_size must be set as n * n,such as 16(4 * 4),64(8*8,default)or other. otherwise the assert will throws the exception. but I don't know why.
n*n for batch_size didn't work for me. Tried 4 & 16 with both crashing soon into training with the assertion error.
However, setting sample_size to (n * n) did work for me. I used 16(4*4) for that test and the training fully completed. That was also with batch_size set to 1 just to rule that out completely. I haven't tested other sizes for sample_size yet.